5 — VEHICLE CONTROL LANGUAGE (VCL)
Curtis Model 1351 – December 2018
Return to TOC
pg. 94
Write_ID = Write_SDO() Each SDO write will provide a Write_ID handle
is function sends an expedited SDO request to write to change a parameter
in a specic device identied by its Node ID. e function will return a handle
(i.e., Write_ID) to the 1351’s write buer location where the data will be placed.
Each buer location is 32 bits (4 bytes) wide. e VCL can have up to 16 pending
SDO writes.
e Write ID is used to check the status of the SDO write.
Once a message is responded to from the slave and checked, it is pulled from the
buer. e buer is 16 messages deep. If a buer is full, the Write SDO function
will return an invalid ID of 0 (valid IDs are 1-16), meaning no more messages
can be sent until the pending messages are checked and pulled from the buer,
or the write buer is cleared.
When each write is made, an individual timer is started. If the timer expires before
the write is successfully executed, a fault will be set. Checking the status of a timed-
out value will return a fault code (see the error code table for Check_SDO_Write,
next page).
Write_SDO(Port,Node_ID,Index,Sub-Index,Length,
Variable,Timeout)
:
Port_1 = CAN1 Specify only one 1351 port. e primary CAN port,
pins 3 & 4
Port_2 = CAN2 Specify only one 1351 port. e secondary CAN
port, pins 5 & 6
Node ID e Slave Node ID
Index e Index of the parameter to read
Sub-Index e sub-Index of the parameter to read
Length e length of the parameter (16 bit or 32 bit)
Timeout Specify the maximum response time
(in milliseconds)
:
Write_ID (i.e., the handle to check the status)
:
BAD_ID Port# out of Range