Hello, how are you?
I need to add an offset (Y) at some points in my program, but this offset information is external via analog signal. I am already using 3 registered points to define Home_pos:
PR [1] Home_pos1
PR [2] Home_pos2
PR [3] Home_pos3
Questions:
1- Can I get more than three points recorded PR[X]
2- Is it possible to associate an analog value to increment an offset value to an existing point? R[X] = AI[X]
Add Offset to Y Robot Fanuc
-
Ricardo Oliveira -
May 28, 2019 at 4:53 PM -
Thread is marked as Resolved.
-
-
Yes to both of your questions.
1. Newer controllers come with a default of 100 PR's and can be expanded to hundreds.
2. An analog value can be stored into a register just as you have shown.
To then use the analog input to select a PR I would do the following, which will copy the PR value into a different PR based on the AI value.
R[X] = AI[X]
PR[X] = PR[R[X]] -
Thanks for the explanation HawkME!
Still in the same question, would it be possible to put the actual value (1250mm) in the Y coordinate, instead of increasing the offset that the position would change from one routine to another (10mm)?
And how would I write this in my program? -
R[X] = AI[X]
PR[X,J] = R[X] (J being 2 for X,Y,Z,W,P,R) -
I don't think 1250 is a valid number for an analog input. Usually 0-10 volts or 4-20 ma. Anyway, it may not be the most reliable to directly set the mm value from an analog source. For safety and reliability I would instead prefer to have several preset PRs that can be selected by the AI and not need to be accurate to the hundredth of a volt.
-
Thanks
-
As HawkME stated using an exact AI to R[j] can be problematic, both because of what HawkME said about the precision and the fact you may want to have it be a range that be something like 0-10 volts = 500-1250 mm. For something like that I would calculate the slope and offset and then multiple it by the value of the AI. If you wanted to have discrete positions then you would have to setup multiple IF .. Then for each of the discrete settings.
R[1] = AI[1]
IF R[1] > 0 and (R[1] < 2.5 or R[1] = 2.5) then
PR[1] = PR[10]
EndIFR[1] = AI[1]
IF R[1] > 2.5 and (R[1] < 5 or R[1] = 5) then
PR[1] = PR[11]
EndIFR[1] = AI[1]
IF R[1] > 5 and (R[1] < 7.5 or R[1] = 7.5) then
PR[1] = PR[12]
EndIFR[1] = AI[1]
IF R[1] > 7.5 and (R[1] < 10 or R[1] = 10) then
PR[1] = PR[10]
EndIFThis would give you 4 discrete locations for the voltage range of 0 - 10 Volts
-
Hello people how are you?
From the answers obtained in the Forum, I think it would be better to work with a GI, it would be safer. -
Hello people how are you?
From the answers obtained in the Forum, I think it would be better to work with a GI, it would be safer.It really depends on what your application is. I don't think you told us what the source of the analog signal is?
If it is an analog sensor wired directly into the robot that is reading an actual distance you want to use, then I would scale the value as I300I300 stated then move the value into the position register element.
Otherwise if it is more of a yes/no or selection situation then a GI would make more sense.