![RoboteQ CANBus Series Скачать руководство пользователя страница 21](http://html1.mh-extra.com/html/roboteq/canbus-series/canbus-series_users-reference-manual_1471291021.webp)
CANBus Networking Manual
21
RoboCAN via MicroBasic Scripting
Self Addressed Commands and Queries
For sake of consistency commands sent to the local node number are executed the same
way as they would be on a remote node. However the no CAN frame is sent to the net-
work. For example if node 04 receive the command
@04!G 1 500
No data will be sent on the network and it will be interpreted and executed the same way as
!G 1 500
RoboCAN via MicroBasic Scripting
A set of functions have been added to the MicroBasic language in order to easily send
commands to, and read data from any other node on the network. Functions are also
available to read and write configurations at a remote node. Maintenance commands are
not supported.
Sending Commands and Configuration
Sending commands or configuration values is done using the functions
SetCANCommand(id, cc, ch, vv)
SetCANConfig(id, cc, ch, vv).
Where:
id is the remote Node Id in decimal
cc is the Command code, eg _G
ch is the channel number. Put 1 for commands that do not normally require a channel
number
vv is the value
Example:
SetCANCommand(04, _G, 1, 500)
Will apply 50% power to motor 1 of node 4
SetCANConfig(0, _OVL, 1, 250)