HMS Networks IXXAT CAN@net NT User Manual page 18

Table of Contents

Advertisement

Lua API Function and Module Reference
Function 'sys.get_ms_time'
sys.get_ms_time()
Returns the system time (32 bit value) in milliseconds.
Function 'sys.get_us_time'
sys.get_us_time()
Returns the system time (32 bit value) in microseconds.
Function 'sys.call_after'
sys.call_after(ticks, func, arg)
Calls the Lua function func after ticks system ticks (resolution is 1 ms). arg can be used as
parameter for func and should be a numeric value.
Example:
function foo(val)
print("delayed "..val)
end
sys.call_after(100, foo, 123)
Function 'sys.set_user_led'
sys.set_user_led(pattern, ticks)
Sets the User LED of the device.
pattern possible values:
1 - turn off (set ticks to 0)
2 - set to red (set ticks to 0)
3 - set to green (set ticks to 0)
4 - set to orange (set ticks to 0)
5 - flash red for ticks ticks
6 - flash green for ticks ticks
7 - flash orange for ticks ticks
8 - blink red (frequency in Hz is 50 / ticks)
9 - blink green (frequency in Hz is 50 / ticks)
10 - blink red/green (frequency in Hz is 50 / ticks)
11 - blink orange (frequency in Hz is 50 / ticks)
12 - blink red/orange (frequency in Hz is 50 / ticks)
13 - blink green/orange (frequency in Hz is 50 / ticks)
ticks: time in multiples of 10 milliseconds
CAN@net NT/CANbridge NT User Manual
There is only one timer available, you can't call sys.call_after() a second time
before the first time is expired.
16 (22)
4.02.0332.20002 1.2 en-US

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IXXAT CAN@net NT and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Ixxat canbridge nt

Table of Contents