User Manual

Table Of Contents
Runtime Commands
Advanced Digital Motor Controller User Manual 179
Syntax Scripting: setcommand(_CG, cc, nn)
setcommand(_CANGO, cc, nn)
Number of Arguments: 2
Argument 1: Channel
Min: 1 Max: Total Number of Motors
Argument 2: Value Type: Signed 32-bit
Min: -1000 Max: +1000
Where:
cc = Motor channel
nn = Command value
CS - CAN Send
Alias: CANSEND HexCode: 18 CANOpen id:
Description:
This command is used in CAN-enabled controllers to build and send CAN frames in the
RawCAN mode (See RawCAN section in manual). It can be used to enter the header,
bytecount, and data, one element at a time. The frame is sent immediately after the byte-
count is entered, and so it should be entered last.
Syntax Serial: !CS ee nn
Syntax Scripting: setcommand(_CS, ee, nn)
setcommand(_CANSEND, ee, nn)
Number of Arguments: 2
Argument 1: Element
Min: 1 Max: 10
Argument 2: Value Type: Unsigned 8-bit
Min: 0 Max: 255
Where:
ee =
1 : Header
2 : Bytecount
3 to 10 : Data0 to data7
nn = value
Example:
!CS 1 5 : Enter 5 in header
!CS 3 2 : Enter 2 in data 0
!CS 4 3 : Enter 3 in data 1
!CS 2 2 : Enter 2 in bytecount and send CAN frame