We are going to be communicating via Modbus between a robot and a mill. A PLC is going to be writing a value to a register that the robot will then convert to a 32bit binary value and transmit that to the mill via modbus. Since group outputs are only 16 bits each, I need two GOs to transmit the value. How do I easily split up my number into two GOs? Is there a FANUC function that makes this easy?
Split register value into two 16bit values for group outputs
-
st1tchy -
March 12, 2020 at 9:03 PM -
Thread is Unresolved
-
-
I would split it in the PLC. Copy the bits into two ints going to group inputs, then just have the robot set GO = GI and you are done.
-
That is something I hadn't thought of and I think it will work. Thanks!
Is there an easy way to do that in the robot though or would it just be a lot of code and math to get it done? I can't think of a way that doesn't involve a lot of code to split a number up like that.
-
I'm not aware of any easy way do to it in the robot.
-
Ok, thanks!
-
If you have the math option in the robot it helps. In the plc we take a Real number and create two INT's; one left side of decimal, the other right side of decimal. Send those values via GI to the robot, in the robot the number gets reassembled in BG logic. New number = Left side + (Right side/1000). For negatives the plc sets a DI and the math just multiplies by -1.