![RoboteQ CANBus Series Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/roboteq/canbus-series/canbus-series_users-reference-manual_1471291022.webp)
RoboCAN Networking
22
CANBus Networking Manual
V2.0 July 8, 2019
Will set the overvoltage limit of all nodes to 25.0V. Note that even though the Overvoltage
is set for the controller and does not normally require that a Channel, the value 1 must be
put in order for the instruction to compile.
Script execution is not paused when one of these function is used. The frame is sent on
the CAN network within one millisecond of the function call.
Reading Operating values Configurations
When reading an operating value such as Current Counter or Amps, or a configurations
such as Overvoltage Limit from another node, since the data must be fetched from the
network, and in order to avoid forcing a pausing of the script execution, data is accessed
in the following manner:
1.
Send a request to fetch the node data
2.
Wait for data to be received
3.
Read the data
The wait step can be done using one of the 3 following ways
1.
Pause script execution for a few milliseconds using a wait() instruction in line.
2.
Perform other functions and read the results a number of loop cycles later
3.
Monitor a data ready flag
The following functions are available in microbasic for requesting operating values and
configurations from a remote node.
FetchCANValue(id, cc, ch)
FetchCANConfig(id, cc, ch)
Where:
id is the remote Node Id in decimal
cc is the Command code, eg _G
cc is the channel number. Put 1 for commands that do not normally require a channel number
The following functions can be used to wait for the data to be ready for reading:
IsCANValueReady()
IsCANConfigReady()
These functions return a Boolean true/false value. They take no argument and apply to the
last issued FetchCANValue or FetchCANConfig function
The retrieved value can then be read using the following functions:
ReadCANValue()
ReadCANConfig()
These functions return an integer value. They take no argument and apply to the last is-
sued FetchCANValue or FetchCANConfig function