5 — VEHICLE CONTROL LANGUAGE (VCL)
pg. 85
Curtis Model 1351 – December 2018
CAN FUNCTIONS (VCL SETUP)
Beyond the parameters in the Programmer app CAN menu, setting up the 1351 to use CAN messages
requires
a VCL program. The applicable 1351 CAN functions are described by topic in this section. An
application’s requirements will determine whether a function will be used, as not all applications will
utilize every VCL function.
• Port1(primary) has 30 receive and 30 transmit mailboxes that can be assigned/used by VCL.
• Port2(supervisor), has 10 receive and 10 transmit mailboxes that can be assigned/used by VCL
• Attempting to assign more that this (using the
Assign_Mailbox()
function will return an
error.
• There are four TPDO and four RPDO mailboxes that can be used and are shared between Port
1 and Port 2.
NMT Control
When a 1351 CAN port is enabled to be a master, it can then send Network Management (NMT)
commands to slave controllers. The 1351 has two CAN ports, CAN1 (
Port_1_Node_Id
) and CAN2
(
Port_2_Node_ID
). The NMT state of each port is available by its specific read-only monitor variable,
port_2_nmt_state
and
port_2_nmt_state
.
function
Send_NMT()
Control the state of the CANopen slave(s). This is the VCL’s CAN
NMT function.
Through NMT services, nodes are initialized, started, monitored, reset or stopped.
All nodes are regarded as NMT slaves. An NMT Slave is uniquely identified in
the network by its Node ID, a value in the range of 1-127, with the restriction that
a slave node cannot share its Node ID with either of the 1351’s CAN port IDs or
any other controller or device on the CANbus network.
Use the
Node_ID
to address a single device or use the constant
GLOBAL
to control
all devices on the CANbus. The NMT serves to configure, initialize, and handle
errors in a CAN network.
syntax
Send_NMT (Port, Node_ID, NMT_Command)
arguments:
Port_1 = CAN1
The primary CAN port, pins 3 & 4
Port_2 = CAN2
The secondary CAN port, pins 5 & 6
Node ID
The Slave Node ID, or Global for all slave nodes
NMT Command
GO_OPERATIONAL
GO_PREOPERATIONAL
STOP_COOMUNINCATIONS
RESET_COMMUNINCATION
RESET_DEVICE
returns: None
reported errors: