Home > HMS NETWORKS > HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide
HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide
CAN@net NT/CANbridge NT Lua ADK
C Funcons Called from Lua
• port: CAN port number (1.. 4), depending on the available CAN ports of the target device.
• format: combinaon of three characters to specify the message format, e.g.:
– "csr"means: "classic CAN", "standard idener (11 bit)", "remote frame"
– "fed"means: "CAN-FD", "extended idener (29 bit)", "data frame"
• ident: message idener
• payload: data bytes of the message as arrayor table(see "can. register_msg")
Funcon 'can.stop'
can.stop(port)
Stop the CAN controller to prevent message recepon/ransmission on the port.
• port: CAN port number (1.. 4), depending on the available CAN ports of the target device.
Funcon 'can.start'
can.start(port)
Start the CAN controller again.
• port: CAN port number (1.. 4), depending on the available CAN ports of the target device.
Funcon 'can.init'
can.init(port, mode, baudA, baudD)
Inialize the CAN controller.
The CAN controller must be stopped beforehand and restarted afer inializaon.
Example:
can.stop(1)
can.init(1, "---", 250, 0)
can.start(1)
• port: CAN port number (1.. 4), depending on the available CAN ports of the target device.
• mode: combinaon of three characters to specify the CAN operaonal mode:
– "aci"means: "acve", "Classic CAN", "ISO" ("---"is also valid as an alernave)
– "lfn"means: "listen-only", "CAN-FD", "non ISO" ("non ISO" only with CAN-FD)
• baudA: Classic CAN: Baud rate value in KBaud like 125, CAN FD: Baud rate value in KBaud for arbiraon phase
• baudD: For CAN-FD: Baud rate in KBaud for data phsae. 0 for Classic CAN
Funcon 'can.set_crossbar_switch'
can.set_crossbar_switch(rx_port, tx_port, turn_on)
Turns the device internal message stream on or o. Message streams are specied by the CAN ports (receive
and transmit can port). The uni-direconal message ow between these ports can be turned on and o with the
crossbar switch.
Page 12 of 20
4.02.0332.20002 Version 1.5
| General | Details |
|---|---|
| Name | HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide |
| Make | HMS NETWORKS |
| Language | English |
| Filetype | PDF (Download) |
| File size | MB |
If you have any questions regarding HMS NETWORKS CANbridge NT Lua ADK Bridge Router User Guide, please ask here and describe the problem in detail.













