Serial Communications¶
Veronte Autopilot 1x can manage input and output serial ports (for more information on this, see the Input/Output section of the 1x PDI Builder user manual.).
A simply way to create serial frames (data in length wires) is by using the simulink UDP block. Therefore, the data entering 1x Autopilot should be sent via UDP (if this approach is adopted):
The ports included in Autopilot 1x and represented in the S-function are as follows:
USB: USB port
SCIA: 4G connection
SCIB: Radio
SCIC: Serial Port 485
SCID: Serial Port 232
Example: Sending a RS-232 message
In the following example, a constant value is sent as a RS-232 message.
First, the message is created as a bit array with Byte Pack block.
Next, it is neccesary to receive this information as UDP packets on the corresponding port (in this case 16003). Width block is used to compute data length. This UDP packet is then sent to the S-function:
Finally, the Autopilot 1x configuration should be able to parse this information using Serial Custom Messages consumers. For more information on this, refer to Serial Custom Messages -> I/O Setup section of the 1x PDI Builder user manual.
Warning
The variable type parsed by Veronte Autopilot 1x has to match the variable type generated in the Byte Pack block.