Simulink driver
This driver is based on the generic driver to communicate using UDP but slightly modified to communicate with a special Simulink block.
Parameters
Aside from the common parameters described in the communication_driver docs, this driver includes:
Parameter | Default Value | Description |
---|---|---|
ip | 127.0.0.1 | IP address of the controller. |
port | 8400 | Port number for the socket connection. |
polling | 1 | Polling interval in seconds to detect connection loss. |
max_size | 1024 | Max telegram size (bytes). |
Setup data
The setup data will give values to the parameters required and will specify the I/O variables info.
{
"parameters": {
"ip": "127.0.0.1",
"port": 8400,
"polling": 1,
"max_size": 1024
},
"variables": {
"input_word": {
"datatype": "word",
"size": 1,
"operation": "write"
},
"output_word": {
"datatype": "word",
"size": 1,
"operation": "read"
}
}
}
note
The setup_params in the generic PLC components for simulink_udp driver will need the following format:
{ "ip": "127.0.0.1", "port": 8400, "polling": 1, "max_size": 1024 }