December 18, 2018, 01:29:38 PM
Robotforum | Industrial Robots Community

 Binary operations on integer variable


Author Topic:  Binary operations on integer variable  (Read 91 times)

0 Members and 1 Guest are viewing this topic.

December 05, 2018, 10:15:38 AM
Read 91 times
Offline

qojote


Hello,
I am using MODBUS registers to transfer commands (2 Bytes) to the robot. The lower byte contains the instruction what action should be performed, the higher byte contains parameters. I failed to parse the integer into three parts like:
Code: [Select]
cmd = input & 0x00FF
cmd_data1 = (input >> 8) & 0x3F
cmd_data2 = (input >> 14)
It seems that the UR (programmed with polyscope) does neither know hexadecimals numbers nor binary mask operations (like shift etc)? Is there a workaround for my issue?

Thanks in advance

Linkback: https://www.robot-forum.com/robotforum/index.php?topic=29906.0
« Last Edit: December 05, 2018, 10:43:20 AM by qojote »

Today at 01:29:38 PM
Reply #1

Advertisement

Guest


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
max speed-value for MOVL/J with Integer variable

Started by fank on Yaskawa Motoman Robot Forum

1 Replies
1820 Views
Last post November 04, 2014, 10:57:17 PM
by roboprof
xx
Convert Unsigned Integer to Signed Integer

Started by TrevorBlevins on Kawasaki Robots

2 Replies
322 Views
Last post August 16, 2018, 12:32:20 AM
by TrevorBlevins
xx
Conversion of two 16bits Signed Integer in a 32bits Signed Integer

Started by jleblanc on Fanuc Robot Forum

4 Replies
729 Views
Last post February 27, 2018, 06:47:30 PM
by jleblanc
xx
transfer data to the robot controller using binary string ?

Started by Aman on KUKA Robot Forum

5 Replies
2871 Views
Last post April 15, 2014, 01:50:41 PM
by SkyeFire