PosCon3D.send_command¶
-
PosCon3D.
send_command
(address, command, data=None)[source]¶ Sends a command to the sensor’s address specified. The command can optionally contain a data string.
This method is mostly for internal use, as the higher-level API is exposed via dedicated methods.
- Parameters
address (
int
) – PosCon3D sensors have an address assigned, which defaults to 1. There’s also a broadcast address (PosCon3D.BROADCAST_ADDRESS
) that can be used to query the address of the sensor connected to the RS-485 bus. Only one sensor can be in the bus when using the broadcast address to query for sensor’s address.command (
string
) – A string indicating the command number to be executed.data (
string
) – An optional string of data that is sent together with the command.
- Returns
list or value – Result of the command. It can be a list or a single value depending on the operation.