Does anyone have any example programs on how to use the SENDDATA and GETDATA macros?
What I want to do is send a PR from one robot to another robot. I believe I could do that with the above macros.
Does anyone have any example programs on how to use the SENDDATA and GETDATA macros?
What I want to do is send a PR from one robot to another robot. I believe I could do that with the above macros.
I dont know how work this macros, but me was interesting to know with what protocol you communicate your robots( DI/DO, Ethernet, PN, PB, DN,...)
I ended up calling Fanuc and asking them what these do. They are the macros used to communicate to a program on a computer somewhere running the pc dev kit. Useless for what I need.
I just wish the included macros had a bit more text inside of them that stated what they do.
ho-ho. this sounds interesting, Fanuc in Europe says me what pc dev kit using only in USA, Canada. Because its software is not available to buy in my country.
I have this on my manual.
I have not worked with multiple robots before but the example below seems relevant.
It is on page 517 of R-30iA_KAREL_Reference_Manual_[Ver.7.30][MARRCRLRF04071E_REV.B]
But if you search your manual for the function names you should be able to find it in whatever manual you have.
Example 3 GET_VAR and SET_VAR can also be used to set register values.
This will work for the local robot with the program names *posreg* and *numreg*. For the local robot this has similar functionality to the GET_POS_REG, GET_REG and SET_REG, SET_POS_REG built-ins. The built-ins only work for the local robot. You can access robots in the ring via GET_VAR and SET_VAR by using the robot name as part of the program name.
For the case of GET_VAR on numeric registers, the type of the KAREL variable must match the type of the register or the error, “Incompatible value” is returned. In the example below if numeric register 10 is a real value an error will be returned and the real value will be set in the error case.
If a position register is locked and you attempt to set it, the error position register locked is returned. See Using GET_VAR and SET_VAR To Set Register Values .
Using GET_VAR and SET_VAR To Set Register Values
program GETREG %nolockgroup
VAR
entry: integer
status: integer int_data: integer real_data: real posext_data: xyzwprext
BEGIN
GET_VAR(entry, ’\\mhrob01\*numreg*’, ’$NUMREG[10]’, int_data, status) IF status <> 0 THEN
GET_VAR(entry, ’\\mhrob01\*numreg*’, ’$NUMREG[10]’, real_data, status) ENDIF
GET_VAR(entry, ’\\mhrob01\*posreg*’, ’$POSREG[1, 10]’, posext_data, status) SET_VAR(entry, ’\\mhrob01\*numreg*’, ’$NUMREG[20]’, int_data, status) SET_VAR(entry, ’\\mhrob01\*numreg*’, ’$NUMREG[21]’, real_data, status) SET_VAR(entry, ’\\mhrob01\*posreg*’, ’$POSREG[1, 20]’, posext_data, status)
end GETREG
Nation mean that getdata and senddata marcos in standart TP program.
You need to be a member in order to leave a comment