You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From current configuration of robot_packages: sick.yaml
The laser_modes tag has a different behaviour than other tags (inputs, outputs, custom_inputs, custom_outputs),
specifically the output tag
address_registers:
laser_mode_output: 2001
current_speed: 2002
laser_modes: # custom laser modes
standard: # custom name of the mode
input: 237 # input to read the mode
output: 0 # value of the register when writing in the modbus address
docking_station:
input: 239
output: 771
cart:
input: 240
output: 257
Current behaviour of laser_modes/laser-name/output
The input and output tag should give the position in the modbus table. The PLC interprets that information as a the position of a bit in a byte. For example for standard/input the value is 237 and in the PLC is the byte 29 (237/8), bit 8 (237%8).
However, laser_modes/<laser-name>/output works different. The decimal number is a binary representation of two bytes to fill in the PLC.
The position of the byte is defined in address_registers/laser_mode_output. In this case 2001 which represents the byte 250 in bit 1. This is the bit, which the number 771, 257 or 0 (in binary) will be apply.
How to do
This behaviour was implemented a long time ago because in robot with two lasers, we needed to set one by one manually. Since a long time, the lasers are managed by the PLC, so we only need to send a single byte.
The laser_modes/<laser-name>/output has to work with the same logic as the laser_modes/<laser-name>/input
Check if current_speed is used and remove it if not
Remove address_registers
The text was updated successfully, but these errors were encountered:
Description of the problem
From current configuration of robot_packages: sick.yaml
The
laser_modes
tag has a different behaviour than other tags (inputs, outputs, custom_inputs, custom_outputs),specifically the
output
tagCurrent behaviour of laser_modes/laser-name/output
The input and output tag should give the position in the modbus table. The PLC interprets that information as a the position of a bit in a byte. For example for
standard/input
the value is 237 and in the PLC is the byte 29 (237/8), bit 8 (237%8).However,
laser_modes/<laser-name>/output
works different. The decimal number is a binary representation of two bytes to fill in the PLC.The position of the byte is defined in
address_registers/laser_mode_output
. In this case 2001 which represents the byte 250 in bit 1. This is the bit, which the number 771, 257 or 0 (in binary) will be apply.How to do
This behaviour was implemented a long time ago because in robot with two lasers, we needed to set one by one manually. Since a long time, the lasers are managed by the PLC, so we only need to send a single byte.
laser_modes/<laser-name>/output
has to work with the same logic as thelaser_modes/<laser-name>/input
current_speed
is used and remove it if notaddress_registers
The text was updated successfully, but these errors were encountered: