ezeio2:scriptref:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
ezeio2:scriptref:start [2019-09-02 21:32] andrehezeio2:scriptref:start [2020-11-12 22:53] johpar
Line 1: Line 1:
 ===== Script reference ===== ===== Script reference =====
-{{indexmenu_n>710}}+{{indexmenu_n>900}}
  
 === ezeio script programming - the PAWN language === === ezeio script programming - the PAWN language ===
Line 35: Line 35:
 Although the user script runs in a sandboxed runtime engine, the recommended programming pattern is similar to [[https://en.wikipedia.org/wiki/Cooperative_multitasking|cooperative multitasking]]. Although the user script runs in a sandboxed runtime engine, the recommended programming pattern is similar to [[https://en.wikipedia.org/wiki/Cooperative_multitasking|cooperative multitasking]].
  
-This means that you should avoid long-running loops, and instead make use of blocking calls or system callbacks provided in the function library. +This means that you should avoid long-running loops, and instead make use of system callbacks provided in the function library.
- +
-The following calls are blocking and are allowed in 'superloops': +
- +
-| ''ModbusRead()'' | Read a register block from a Modbus RTU device | +
-| ''RS485WriteRead()'' | Write & Read to the Modbus port in 'raw' mode (not Modbus protocol) | +
-| ''ModbusWriteRead()'' | Write and read Modbus commands on the RTU port | +
-| ''SDICmd()'' | Send a SDI12 command and receive the response | +
-| ''ModbusTCP()'' | Send & Receive Modbus commands on the Ethernet port | +
-| ''sleep()'' | Suspend the script for a short time (process events immediately) | +
-| ''msSleep()'' | Suspend the script for a short time (not processing events - DEPRECIATED) | +
-| ''MBRTU_Read()'' | Read a register from a Modbus RTU device | +
-| ''MBRTU_Write()'' | Write to a register on a Modbus RTU device | +
-| ''MBTCP_Read()'' | Read a register from a Modbus TCP device | +
-| ''MBTCP_Write()'' | Write to a register on a ModbusTCP device | +
-| ''SunSpecIP_Base()'' | Find the base address for a SunSpec/TCP device | +
-| ''SunSpecIP_Ofs()'' | Find the offset for a SunSpec/TCP device | +
  
 The following system callback functions are defined: The following system callback functions are defined:
Line 61: Line 44:
 | ''@Key'' | Called when a button is pressed on a connected terminal device | | ''@Key'' | Called when a button is pressed on a connected terminal device |
 | ''@Scan'' | Called when a code is received from a scanner device | | ''@Scan'' | Called when a code is received from a scanner device |
-| ''@J1939'' | Called when a J1939 packet is received | 
  
 === State machines === === State machines ===
  • ezeio2/scriptref/start.txt
  • Last modified: 2024-03-01 17:24
  • by andreh