User guide
61
VTB USER GUIDE
PXCO_SDODL or PXCO_SDOUL. The read code will be written in the system variables _SYSTEM_SDOAC0 e
_SYSTEM_SDOAC1.
Refer to the DS301 specific of the CAN OPEN for the code error values.
Hardware All
Syntax
READ_SDOAC()
PXCO_SEND
Sending of a CAN frame at low level. This function allows to send in the net a CAN frame with a desired COB-ID and
DATS. For example it's possible to send manually PDO frames, HEART-BEAT frames, etc.
Should be specified the manage of PDO is managed AUTOMATICALLY by the CANOPEN CONFIGURATOR.
Hardware All
Syntax
PXCO_SEND(int id, char Len,char *Data) as char
Parameters
Id COB-ID value
Len Number of data to send
*Data Pointer to the data buffer
Return value
char 0 No error
<>0 Communication error
Example
Used variables:
value int
Ret char
value=100
Ret=pxco_send(0x201,2,value()) ‘Send a PDO (cob-id=0x201) with 2 byte
if Ret<>0 ‘test if error occurs
...
endif
PXCO_NMT
Sending of a NMT frame of the CAN OPEN. NMT protocol allows to set the state of the nodes in the net. Remind that all
the nodes correctly configured (canopen configurator) are automatically set in START state.
Hardware All
Syntax
PXCO_NMT(char state, char node) as char
Parameters
state State to set:
1 = START NODE
2 = STOP NODE
128 = PRE-OPERATIONAL
129 = RESET NODE
130 = RESET COMUNICATION
node Number of the node
Return value
char 0 No error
<>0 Communication error