Easy Logic. Scripting Language Description PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Easy Logic.

Scripting
language description

www.galileosky.com
Easy Logic. Scripting language description

Contents
Introduction...................................................................................................................................4
Structure of the program.............................................................................................................4
Variables declaration..................................................................................................................5
Arrays and strings........................................................................................................................6
Functions.......................................................................................................................................8
Rational numbers.........................................................................................................................9
Built-in functions of scripting language....................................................................................10
Functions working with global variables............................................................................12
Functions for working with tags...........................................................................................13
Functions for working with serial ports RS232 and RS485..............................................14
Functions to work with microSD card file system...............................................................16
Functions for CRC calculation.............................................................................................19
Functions for CAN-bus processing.....................................................................................20
Other functions......................................................................................................................23
Appendix A. List of predefined global variables....................................................................24
Appendix B. List of tag IDs in scripting language context......................................................34
Easy Logic. Scripting language description

Introduction
For scripts programming in Configurator, C-like scripting language is used. It has some
special features in operation that will be considered in current manual.

Structure of the program


Any program should contain “entry” function MAIN that will be called when a script is
started from the algorithm. After leaving main function the script is completed and all
variables are erased, that is why if data is needed to be saved between iterations of the
script, it is recommended to use global variables in the algorithm.

main()

Diagnostics("Hello world")

Differences from C-language:

 no headers are required;


 ";" symbols are optional except when several expressions are written in one line;
 if function consists of one instruction, brackets {} are not required;
 if the result of the function is not used in expressions and assignments, brackets for
function arguments can be omitted.

3
Easy Logic. Scripting language description

Variables declaration
32-bit integer variables are used in the language.

Inside the variable big-endian format of reading is used (older bytes come first). To declare
a new variable, operator new followed by the name of the variable is used. Variables
should be declared before being used in expressions. Also variable value can be initialized
when being declared:

main()

new j = 35 //Declaration and initialization of variable j

new res //Declaration of variable res


res = j + 5

Diagnostics("Result %d", res)

To declare constants - operator const is used:

const STATE_NOT_CONNECTED = 0

4
Easy Logic. Scripting language description

Arrays and strings


The language supports single-dimensional and multi-dimensional arrays.

Index linking starts with 0 element. An array is a sequence of 32-bit words, access to which
is provided with square brackets [].Each word consists of 4 bytes, that is why to decrease
memory consumption you can use byte-serial access with the help of curly braces {}, it
allows to use an array as a sequence of bytes. As well as regular variables, an array can be
declared as a constant and/or can be initialized.

const PORT_BUF_SIZE = 245

new oBuf{PORT_BUF_SIZE} //Array declaration with a size of 245 bytes and memory
consumption of 245/4 => 62 elements (32-bit words)

new cBuf[10] //Array declaration with a size of 10 elements 32-bit words), which is 10*4 =>
40 bytes

new const fMap_fAttr[2] = [0x20000, 0x50000] // Declaration of constant array with its
initialization

Examples of access to array elements:

oBuf{0} = 2 //Value 2 assignment to 0 byte of an array

oBuf[1] = 0x5028100 // Value 0x5028100 assignment to the 1st element of the same array,
it will be equivalent to the following actions:

//oBuf{4} = 0x05

//oBuf{5} = 0x02

//oBuf{6} = 0x81

//oBuf{7} = 0x00

cBuf{1} = 0x5 // Equivalent to the following record (attention, 4 bytes are recorded at
once): cBuf[0] = 0x00050000

5
Easy Logic. Scripting language description

Multi-dimensional arrays include references to subarrays. Each subarray may have a


different length. Here are examples of 2-dimensional arrays declaration:

new a[4][3] //4 lines each having 3 columns

new e[2][] = [ "OK", "Cancel" ] // 2-dimensional array with subarrays with different length. e[1]
[5] contains letter "l", but e[0][5] is invalid element, as subarray length is equal to 3 ("O", "K", "\
0")

To find a size of an array - operator sizeof is used. It returns the number of elements (32-bit
words), but not bytes. For multi-dimensional arrays calling of such operator with array name
without brackets will return the main dimensions, with brackets – subarray dimensions:

new matrix[3][2] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }

Diagnostics("%d %d", sizeof matrix, sizeof matrix[]); //Diagnostics will show a line 3 2

Lines represent single-dimensional arrays.

6
Easy Logic. Scripting language description

Functions
To declare a function enter its name, accepted arguments and its body in curly braces. The
order of a function declaration is not important. A function can both return values (operator
return <value> is used), or not return.

main()

new res = myFunc(3, 5)

Diagnostics("Result %d", res) //Diagnostics will show a line Result 10

//Custom function

myFunc(a, b)

a += 2

return a + b //Returning value

By default, arguments are sent to function by value, meaning that any changes of the value
in the function will not affect the value of the source variable. But they can also be sent by
reference. For this operator & is used when arguments are declared:

//Custom function

myFuncRef(&a, b) //Argument a will be sent by reference, argument b will be sent by value

...

7
Easy Logic. Scripting language description

Array sending to function is automatically done only by reference. In order to do this you
should enter array variable when declaring the arguments:

myArrayFunc(buf{}, size)

for(new i = 0; i < size; i++)

Diagnostics("Buf[%d] = %d", i, buf{i})

main()

new buf{3} = {1, 2, 3}

myArrayFunc(buf, 3)

Rational numbers
Current script language build doesn’t support operations with rational numbers. Only integer
operations can be used. Example of integer operations for calculation of expression
Pressure=Р*5,5-101,3 kPa and its translation to psi with rounding to whole numbers:

// ioBuf{7} - array element with encoded pressure value received from the sensor

p = (ioBuf{7}*5500 - 101300) * 145 / 100000

p += 5

p /= 10

Diagnostics("Pressure is %d psi", p) //If ioBuf{7}==57, precise value equals to 30,777008 psi;


As a result of shown method, diagnostics will show Pressure is 31 psi

8
Easy Logic. Scripting language description

Built-in functions of scripting


language
Scripting language provides built-in functions for co-operation with peripheral devices,
variables, tags of the protocol.

Diagnostics – a function of diagnostics messages


output
The function shows messages in diagnostics. To see these messages in Configurator, tick
parameter “Algorithm and script diagnostics”. To show numbers and values of variables
symbol % with modifiers is used:

 %d - showing numbers in decimal format;


 %X - showing numbers in hexadecimal format;
 %02d - showing numbers in decimal format with a minimum number of displayed
symbols equal to 2, and if there are less symbols, missing symbols will be filled with
zeroes.

Maximum number of shown variables with one command is 2. If there are more operands-
variables, the result of display will be unpredictable.

The examples of command Diagnostics in use:

Diagnostics("Tracker time: %d. Tracker status: %d", time, status) //What will be shown: Tracker
time: 946687968. Tracker status: 14848

new value = 14

Diagnostics("Value %d (0x%02X)", value, value); //What will be shown: Value 14 (0x0E)

9
Easy Logic. Scripting language description

Example of a function showing array values:

// Showing hexadecimal values in diagnostics from the buf buffer with size determined by
variable size

printData(buf{}, size)

// showing 2 bytes per line

for(new i=0; i < size/2; i++)

Diagnostics("%02X %02X", buf{i*2}, buf{i*2+1})

Delay(10)

// showing last byte if the size is not even

if (size % 2)

Diagnostics("%02X", buf{size-1})

Delay – delay in the algorithm


This function stops executing the script for a certain time. It looks like the following:

Delay(timeout)

 timeout – delay value, ms.

DisablePulseCounting – impulse count disabling


This function controls pulse counting on a certain input:

DisablePulseCounting(inputNum, disabled)

 inputNum – input number.

 disabled – count control: 1 – count prohibited; 0 – count allowed.

10
Easy Logic. Scripting language description

SetOutputValue – control of output state


This function is used for setting outputs as enabled or disabled:

SetOutputValue(outputNum, value)

 outputNum – output number.

 value – output control: 1 – output closed; 0 – output opened and connected to the
ground.

SavePoint – extra point saving


This function is used to save an extra point. Attention, function will block the script and may
require up to 1 second to be executed:

SavePoint()

Functions working with global variables


Global variables are used to provide collaboration between scripts and tracker internal
variables, since they are available from any part of the script. In order to read such variables
GetVar function is used, in order to write into them – SerVar. Variables can be predefined
from the tracker firmware or custom made using Global variables section in the Easy Logic
tab.

GetVar – reading global variable value


This function returns the value of a global variable:

new time = GetVar(UNIX_TIME) //Reading predefined global variable containing unix time

 UNIX_TIME - global variable name.

SetVar – writing a value into a global variable


This function writes a certain value into a chosen global variable:

new value = 56

SetVar(Global0, value) //Writing value into global variable Global0

 Global0 – name of the global variable.


 value – recorded value.

11
Easy Logic. Scripting language description

List of predefined global variables


The list is shown in the Appendix A.

Functions for working with tags


In order to record a value into tag, TagWriteValue is used, as well as TagWriteArray for
array tag recording. Identification system of the tags is different from the one described in the
Galileosky protocol and is provided later in this document. When writing into array tag,
remember that the order of reading bytes in a 32-bit array element is different from the one
used in the protocol: in scripting language big-endian format is used, on the server – little-
endian. Built-in function swapBuf can be used for conversion needs.

TagWriteValue – writing a value into tag


This function is used to record a certain value into specific tag. Attention, identification of the
tags is different from the one described in the Galileosky protocol:

TagWriteValue(tagId, value)

 tagId – tag ID in the scripting language context.


 value – recorded value.

TagWriteArray – writing a value into tag array


This function is used to record certain value or values into tag array. Attention, identification
of the tags is different from the one described in the Galileosky protocol:

TagWriteArray(tagId, buf_size, buf)

 tagId - tag ID in the scripting language context.


 buf_size – size of the recorded array in bytes.
 buf – name of the recorded array.

swapBuf – changing the bytes order in array


This function is used to change the bytes order inside the array elements from big-endian to
little-endian.

swapBuf(buf, size)

 buf – name of the modified array.


 size – size of the modified array, should be divisible by 4

12
Easy Logic. Scripting language description

List of tag IDs in the scripting language context


The list is shown in the Appendix B.

SendAnswer – sending reply to a command from


server
This function sends text reply to a received command and connects extra data array to it (see
more in the Galileosky protocol description).

In order to make correct answer arrays are needed. Both arrays (reply text and extra data)
should be transformed from big-endian into little-endian, as well as array tag, for example,
using swapBuf function.

Command format:

SendAnswer(gConnId, gCmdNum, textBuf, textSize, dataBuf, dataSize)

 gConnId – connection ID. Use a global variable, into which the


“CONNECTION_ID” will be saved when a command is received.
 gCmdNum – command number. Use global variable to save the
“COMMAND_NUMBER " variable when command is received.
 textBuf – array consisting of a text reply to the server.
 textSize – text reply array size in bytes.
 dataBuf – array with additional data.

 dataSize – size of the array with additional data in bytes. If the data is not required
to be sent, size is set as 0.

Example of sending reply “TAHO 01”:

iBuf[0] = 0x4F484154 //ASCII: "OHAT"

iBuf[1] = 0x00313020 //ASCII: "10 "

swapBuf(oBuf, oBufSize)

SendAnswer(GetVar(gConnId), GetVar(gCmdNum), iBuf, 7, oBuf, oBufSize)

Functions for working with serial ports RS232 and


RS485
To execute input/output operations one need to initialize a port by command PortInit. Then
data is transferred with the help of PortWrite and PortRead functions. When the script is
completed, initialization resets.

13
Easy Logic. Scripting language description

For RS485 bus handler method is used, i.e. besides script the bus can interact with other
processes, e.g. the process of receiving photos from the camera, processing RFID-readers,
etc. The terminal cyclically changes handlers, waiting for completion of each of them, and
after entering the script – waits until it leaves it. So if only Easy Logic work with port is
required, e.g. when the terminal is a slave device, run an infinite cycle inside script so that it
will never complete.

Standard sequence of operation with a port is as follows:

main ()

PortInit(PORT_INDEX, PORT_SPEED, PORT_BUF_SIZE) //Initializing the port

PortWrite(PORT_INDEX, oiBuf, b_size) //Writing into port a buffer oiBuf with size
equal to b_size bytes

new bytesRead = 0 //Number of bytes received from the port

while(PortRead(PORT_INDEX, c, 7000)) { //Reading from port with a set timeout of


waiting for the bytes

//Constructing a message from received bytes

oiBuf{bytesRead} = c

bytesRead++

//Processing the received message using buffer oiBuf with a size equal to bytesRead

PortInit – port initialization


This function is used to initialize the port and goes as follows:

PortInit(PORT_INDEX, PORT_SPEED, PORT_BUF_SIZE, STOP_BITS, PARITY)

 PORT_INDEX – used port index: 0 - RS232-0; 1 - RS232-1; 2 - RS485.


 PORT_SPEED – port baudrate, bit per sec: for example, 9600 bit/s.
 PORT_BUF_SIZE – port buffer size, bytes.
 STOP_BITS – number of stop bits (optional): 0 - 1 stop bit (value by default); 1 - 2
stop bits.
 PARITY – parity setting (optional): 0 – not used (value by default); 1 - ODD; 2 -
EVEN.

PortWrite – writing into port


This function is used to write set buffer into the tracker port and goes as follows:

14
Easy Logic. Scripting language description

PortWrite(PORT_INDEX, oiBuf, b_size)

 PORT_INDEX – index of port opened with PortInit.


 oiBuf – name of the recorded buffer.
 b_size – size of the recorded buffer in bytes.

PortRead – reading bytes from the port


This function is used to read bytes from the port. Function is blocking the rest functions, query
timeout is set manually. Returns 1 if the byte is successfully read, 0 – if during the timeout
nothing was read.

res = PortRead(PORT_INDEX, c, timeout)

 PORT_INDEX - index of port opened with PortInit.


 c – variable where the read byte will be recorded.
 timeout – timeout value, ms.
 res – function result: 1 – byte was read, 0 – during set timeout byte was not
read.

Functions to work with microSD card file system


FileSize – size of the file
This function returns size of the file in bytes. If requested file does not exist, -1 is returned.

FileSize(const filename[])

• filename – full path and name of the file.

FileRead – reading from the file


This function reads the file and returns size of read data in bytes.

FileRead(const filename[], buf[], const bufSize, const offset)

• filename – full path and name of the file.

• buf – array, to where the data will be read.

• bufSize – size of the read data in bytes.

• offset – offset from the file beginning, starting from where the data will be read.

15
Easy Logic. Scripting language description

FileWrite – writing into the file


This function writes data into file. Returns number of written bytes.

FileWrite(const filename[], const buf[], const bufSize, const offset)

• filename – full path and name of the file.

• buf – array, to where the data will be read.

• bufSize - size of the read data in bytes.

• offset – offset from the file beginning, starting from where the data will be written. If
-1 is set, data will be written in the end of the file.

NextDir – receiving a list of folders inside a chosen folder


This function is used to get info about a folder contents.

NextDir(const rootDir[], const lastDir[], res[], const resSize)

• rootDir – full path to the folder where search is done.

• lastDir – last folder found during the search.

• res – array where root and name of a folder will be written.

• resSize – size of the res array in bytes.

FileDelete – deleting the file


This function is used to delete specific file.

FileDelete(const filename[])

• filename – full path and name of the file.

Example:

main()

// Example of creating an array of filename

new file_name_1{} = "test_file_1";

16
Easy Logic. Scripting language description

new file_name_2{11} = "test_file_2";

const buf_1_len = 5;

const buf_2_len = 4;

const four_bytes_buff = 4;

new data_buffer_1{buf_1_len} = {1, 2, 3, 0x04, 0xFF}; // Byte array

new data_buffer_2[buf_2_len] = [0x12345678, 0x1F2F3F4F, 0x1A2A3A4A, 15800]; //


4-byte array

// Writing into file

new start_pos = 0;

new write_bytes = 0;

// Writing one-byte array

write_bytes = FileWrite(file_name_2, data_buffer_1, buf_1_len, start_pos); // Writing into


file starting from a specific place

write_bytes = FileWrite(file_name_2, data_buffer_1, buf_1_len); // Writing into the end if


the ffile

if (buf_1_len == write_bytes)

// Checking the writing process

Diagnostics("Write success");

else

Diagnostics("Write fail");

// Reading the file

new read_bytes = 0;

const tmp_buf_len = 10;


new tmp_buf{tmp_buf_len};

17
Easy Logic. Scripting language description

read_bytes = FileRead(file_name_2, tmp_buf, tmp_buf_len); // Reading first 10 bytes from


the file

read_bytes = FileRead(file_name_2, tmp_buf, tmp_buf_len, 5); // Reading 10 bytes of the


file starting from the 5th

if (tmp_buf_len == read_bytes)

Diagnostics("Read success");

else

Diagnostics("Read fail");

}
}

Functions for CRC calculation


Language supports CRC calculation of the following standards:

1. CRC8 - CRC8 ROHC


2. CRC8_D5 - CRC8 D5 (initialization: 0xFF; polynomial: 0xD5)

3. CRC16 - CRC16 Modbus

Example:

// Size of the message and included buffer

#define MSG_SIZE 10

//! Buffer with the message that needs CRC calculation

new msg{MSG_SIZE} = {0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x13, 0x4B, 0x13}

main()

new crc

//CRC 8

crc = CRC8(0xFF, msg, MSG_SIZE) //CRC8_ROHC

18
Easy Logic. Scripting language description

Diagnostics("CRC8_ROHC = %02X", crc) //CRC8_ROHC = 48

crc = CRC8_D5(msg, MSG_SIZE) //CRC8_D5

Diagnostics("CRC8_D5 = %02X", crc) //CRC8_D5 = 4B

// CRC 16

crc = CRC16(msg, MSG_SIZE) //CRC16_Modbus

Diagnostics("CRC16_modbus = %02X", crc) //CRC16_modbus = 93FA

Functions for CAN-bus processing


Structure - CANMSG[.id, CANIdType:.idType, .dataSize, .data{8}]

main()

new canMessage[CANMSG]

canMessage.id = 0xFFFFFFFF

canMessage.idType = 1 // 0 - 11 bit ID, 1 - 29 bit ID

canMessage.dataSize = 8

canMessage.data[0] = 0x11223344

canMessage.data[1] = 0x55667788

CANInit – CAN-bus initialization


This function is used to initialize CAN-bus.

CANInit(speed, active)

• speed – CAN-bus baudrate.

• active – sending CAN data into bus (1 - allowed, 0 - prohibited).

CANEnableReception – CAN messages receiving enabling


This function is used to enable or disable CAN-bus messages reading.

19
Easy Logic. Scripting language description

CANEnableReception(enable)

• enable – 1 - enable, 0 - disable.

CANSetFilter – setting filter for CAN reading


This function is used to filter received CAN messages.

CANSetFilter(id, mask, idType)

• id – CAN-message identifier.

• mask – CAN-message mask.

• IdType — type of the CAN-message ID; 0 — 11-bit, 1 — 29-bit.

CANSend – sending CAN-message


This function is used to send messages into the CAN-bus.

new canMessage[CANMSG]

CANSend(canMessage)

CANReceive - receiving CAN-message


This function is used to receive messages from the CAN-bus.

new canMessage[CANMSG]

CANReceive(canMessage)

Examples of using the functions:

1. Receiving messages

main()

Delay(4000)

new can_message[CANMSG]

new in = CANInit(250000, 0)

CANSetFilter(0x1AF, 0, 0)

20
Easy Logic. Scripting language description

CANEnableReception(1)

while(1)

if(CANReceive(can_message))

{ DiagnosticsHex(can_message.data, 8) }

2. Sending messages

main()

Delay(5000)

new canMessage[CANMSG]

canMessage.id = 0x18DAEEF1

canMessage.idType = 1

canMessage.dataSize = 8

CANInit(250000, 1)

CANSetFilter(0, 0, 1)

CANEnableReception(1)

canMessage.data[0] = 0x02107E00

canMessage.data[1] = 0x00000000

new res = CANSend(canMessage)

if (!res)

{ Diagnostics("message not sent") }

21
Easy Logic. Scripting language description

Other functions
getIntFromBuf – receiving a 32-bit number from an array
Function returns 32-bit number constructed from elements, starting from the following:

res = getIntFromBuf(buf, index)

 buf – array. From where the number is extracted.


 index – starting element of the extraction.

min – returns minimal value


Function compares two numbers and returns the smallest:

res = min(value1, value2)

 value1 – first number.


 value2 – second number.

22
Easy Logic. Scripting language description

Appendix A. List of predefined


global variables
Group Script name Algorithm name Description
Algorithms COMMAND_NUMBER COMMAND_NUMBER Number of the command using
GPRS-connection (tag 0xE0)
Algorithms CONNECTION_ID CONNECTION_ID Identifier of the socket of the
GPRS-connection
Algorithms CONNECTION_TYPE CONNECTION_TYPE Identifier of the connection of the
received command: 0 - USB, 1 -
SMS, 2 - GPRS
Analog inputs IN_0 IN_0 Counter value at input 0
Analog inputs IN_0_OFF IN_0_OFF State of count pulses on input 0:
1 - prohibited, 0 - allowed
Analog inputs IN_1 IN_1 Counter value at input 1
Analog inputs IN_1_OFF IN_1_OFF State of count pulses on input 1:
1 - prohibited, 0 - allowed
Analog inputs IN_2 IN_2 Counter value at input 2
Analog inputs IN_2_OFF IN_2_OFF State of count pulses on input 2:
1 - prohibited, 0 - allowed
Analog inputs IN_3 IN_3 Counter value at input 3
Analog inputs IN_3_OFF IN_3_OFF State of count pulses on input 3:
1 - prohibited, 0 - allowed
Analog inputs IN_4 IN_4 Counter value at input 4
Analog inputs IN_4_OFF IN_4_OFF State of count pulses on input 4:
1 - prohibited, 0 - allowed
Analog inputs IN_5 IN_5 Counter value at input 5
Analog inputs IN_5_OFF IN_5_OFF State of count pulses on input 5:
1 - prohibited, 0 - allowed
Analog inputs IN_6 IN_6 Counter value at input 6
Analog inputs IN_6_OFF IN_6_OFF State of count pulses on input 6:
1 - prohibited, 0 - allowed
Analog inputs IN_7 IN_7 Counter value at input 7
Analog inputs IN_7_OFF IN_7_OFF State of count pulses on input 7:
1 - prohibited, 0 - allowed
CAN CAN_B1 CAN_B1 CAN-LOG. Custom prefix
CAN CAN16BITR0 CAN16BITR0 CAN16BITR0

23
Easy Logic. Scripting language description

Group Script name Algorithm name Description

CAN CAN16BITR1 CAN16BITR1 CAN16BITR1


CAN CAN16BITR10 CAN16BITR10 CAN16BITR10
CAN CAN16BITR11 CAN16BITR11 CAN16BITR11
CAN CAN16BITR12 CAN16BITR12 CAN16BITR12
CAN CAN16BITR13 CAN16BITR13 CAN16BITR13
CAN CAN16BITR14 CAN16BITR14 CAN16BITR14
CAN CAN16BITR2 CAN16BITR2 CAN16BITR2
CAN CAN16BITR3 CAN16BITR3 CAN16BITR3
CAN CAN16BITR4 CAN16BITR4 CAN16BITR4
CAN CAN16BITR5 CAN16BITR5 CAN16BITR5
CAN CAN16BITR6 CAN16BITR6 CAN16BITR6
CAN CAN16BITR7 CAN16BITR7 CAN16BITR7
CAN CAN16BITR8 CAN16BITR8 CAN16BITR8
CAN CAN16BITR9 CAN16BITR9 CAN16BITR9
CAN CAN32BITR0 CAN32BITR0 CAN32BITR0
CAN CAN32BITR1 CAN32BITR1 CAN32BITR1
CAN CAN32BITR10 CAN32BITR10 CAN32BITR10
CAN CAN32BITR11 CAN32BITR11 CAN32BITR11
CAN CAN32BITR12 CAN32BITR12 CAN32BITR12
CAN CAN32BITR13 CAN32BITR13 CAN32BITR13
CAN CAN32BITR14 CAN32BITR14 CAN32BITR14
CAN CAN32BITR2 CAN32BITR2 CAN32BITR2
CAN CAN32BITR3 CAN32BITR3 CAN32BITR3
CAN CAN32BITR4 CAN32BITR4 CAN32BITR4
CAN CAN32BITR5 CAN32BITR5 CAN32BITR5
CAN CAN32BITR6 CAN32BITR6 CAN32BITR6
CAN CAN32BITR7 CAN32BITR7 CAN32BITR7
CAN CAN32BITR8 CAN32BITR8 CAN32BITR8
CAN CAN32BITR9 CAN32BITR9 CAN32BITR9
CAN CAN8BITR0 CAN8BITR0 CAN8BITR0
CAN CAN8BITR1 CAN8BITR1 CAN8BITR1
CAN CAN8BITR10 CAN8BITR10 CAN8BITR10
CAN CAN8BITR11 CAN8BITR11 CAN8BITR11

24
Easy Logic. Scripting language description

Group Script name Algorithm name Description


CAN CAN8BITR12 CAN8BITR12 CAN8BITR12
CAN CAN8BITR13 CAN8BITR13 CAN8BITR13
CAN CAN8BITR14 CAN8BITR14 CAN8BITR14
CAN CAN8BITR15 CAN8BITR15 CAN8BITR15
CAN CAN8BITR16 CAN8BITR16 CAN8BITR16
CAN CAN8BITR17 CAN8BITR17 CAN8BITR17
CAN CAN8BITR18 CAN8BITR18 CAN8BITR18
CAN CAN8BITR19 CAN8BITR19 CAN8BITR19
CAN CAN8BITR2 CAN8BITR2 CAN8BITR2
CAN CAN8BITR20 CAN8BITR20 CAN8BITR20
CAN CAN8BITR21 CAN8BITR21 CAN8BITR21
CAN CAN8BITR22 CAN8BITR22 CAN8BITR22
CAN CAN8BITR23 CAN8BITR23 CAN8BITR23
CAN CAN8BITR24 CAN8BITR24 CAN8BITR24
CAN CAN8BITR25 CAN8BITR25 CAN8BITR25
CAN CAN8BITR26 CAN8BITR26 CAN8BITR26
CAN CAN8BITR27 CAN8BITR27 CAN8BITR27
CAN CAN8BITR28 CAN8BITR28 CAN8BITR28
CAN CAN8BITR29 CAN8BITR29 CAN8BITR29
CAN CAN8BITR3 CAN8BITR3 CAN8BITR3
CAN CAN8BITR30 CAN8BITR30 CAN8BITR30
CAN CAN8BITR4 CAN8BITR4 CAN8BITR4
CAN CAN8BITR5 CAN8BITR5 CAN8BITR5
CAN CAN8BITR6 CAN8BITR6 CAN8BITR6
CAN CAN8BITR7 CAN8BITR7 CAN8BITR7
CAN CAN8BITR8 CAN8BITR8 CAN8BITR8
CAN CAN8BITR9 CAN8BITR9 CAN8BITR9
CAN ENGINE_COOLANT_TE ENGINE_COOLANT_TE Engine coolant temperature, °СС
MPERATURE MPERATURE
CAN ENGINE_SPEED ENGINE_SPEED Engine speed, rpm
CAN FUEL_CONSUMPTION FUEL_CONSUMPTION Fuel consumption, l
CAN FUEL_LEVEL FUEL_LEVEL Fuel level, %
CAN MILEAGE MILEAGE Mileage, km
Digital inputs IBUTTON_0 IBUTTON_0 IButton0 value

25
Easy Logic. Scripting language description

Group Script name Algorithm name Description


Digital inputs IBUTTON_1 IBUTTON_1 IButton1 value
Digital inputs RS232_0 RS232_0 FLS_0 (RS232): Sensor data:
Fuel level
Digital inputs RS232_0_TEMPERATUR RS232_0_TEMPERATUR FLS_0 (RS232): Sensor data:
E E Temperature
Digital inputs RS232_1 RS232_1 FLS_1 (RS232): Sensor data:
Fuel level
Digital inputs RS232_1_TEMPERATUR RS232_1_TEMPERATUR FLS_1 (RS232): Sensor data:
E E Temperature
Digital inputs RS485_FLS_0 RS485_FLS_0 FLS_0 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_0_TEMPERA RS485_FLS_0_TEMPERA FLS_0 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_1 RS485_FLS_1 FLS_1 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_1_TEMPERA RS485_FLS_1_TEMPERA FLS_1 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_10 RS485_FLS_10 FLS_10 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_10_TEMPER RS485_FLS_10_TEMPER FLS_10 (RS485): Sensor data:
ATURE ATURE Temperature
Digital inputs RS485_FLS_11 RS485_FLS_11 FLS_11 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_11_TEMPER RS485_FLS_11_TEMPER FLS_11 (RS485): Sensor data:
ATURE ATURE Temperature
Digital inputs RS485_FLS_12 RS485_FLS_12 FLS_12 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_12_TEMPER RS485_FLS_12_TEMPER FLS_12 (RS485): Sensor data:
ATURE ATURE Temperature
Digital inputs RS485_FLS_13 RS485_FLS_13 FLS_13 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_13_TEMPER RS485_FLS_13_TEMPER FLS_13 (RS485): Sensor data:
ATURE ATURE Temperature
Digital inputs RS485_FLS_14 RS485_FLS_14 FLS_14 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_14_TEMPER RS485_FLS_14_TEMPER FLS_14 (RS485): Sensor data:
ATURE ATURE Temperature
Digital inputs RS485_FLS_15 RS485_FLS_15 FLS_15 (RS485): Sensor data:
Fuel level

26
Easy Logic. Scripting language description

Group Script name Algorithm name Description


Digital inputs RS485_FLS_15_TEMPER RS485_FLS_15_TEMPER FLS_15 (RS485): Sensor data:
ATURE ATURE Temperature
Digital inputs RS485_FLS_2 RS485_FLS_2 FLS_2 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_2_TEMPERA RS485_FLS_2_TEMPERA FLS_2 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_3 RS485_FLS_3 FLS_3 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_3_TEMPERA RS485_FLS_3_TEMPERA FLS_3 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_4 RS485_FLS_4 FLS_4 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_4_TEMPERA RS485_FLS_4_TEMPERA FLS_4 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_5 RS485_FLS_5 FLS_5 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_5_TEMPERA RS485_FLS_5_TEMPERA FLS_5 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_6 RS485_FLS_6 FLS_6 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_6_TEMPERA RS485_FLS_6_TEMPERA FLS_6 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_7 RS485_FLS_7 FLS_7 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_7_TEMPERA RS485_FLS_7_TEMPERA FLS_7 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_8 RS485_FLS_8 FLS_8 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_8_TEMPERA RS485_FLS_8_TEMPERA FLS_8 (RS485): Sensor data:
TURE TURE Temperature
Digital inputs RS485_FLS_9 RS485_FLS_9 FLS_9 (RS485): Sensor data:
Fuel level
Digital inputs RS485_FLS_9_TEMPERA RS485_FLS_9_TEMPERA FLS_9 (RS485): Sensor data:
TURE TURE Temperature
General ACTIVE_CALL ACTIVE_CALL State "Making Voice Call": 0 –
no call, 1 – call is made at the
moment
General BATTERY BATTERY Battery voltage (mV)
General CONNECTION_STATUS CONNECTION_STATU Server connection status: 0 – not
S connected, 1 – connected to the

27
Easy Logic. Scripting language description

Group Script name Algorithm name Description


server
General DAY_OF_WEEK DAY_OF_WEEK Day of the week: 1 – Sunday, 2
- Monday, 3 – Tuesday and so
on
General GPRS_CONNECTED GPRS_CONNECTED GPRS-connection status: 0 – no
connection, 1 – connection is
established
General GSM_REGISTERED GSM_REGISTERED "Registered in GSM network"
status: 0 – not registered, 1 -
registered
General GSM-UNIT_ENABLED GSM-UNIT_ENABLED Using GSM-unit: 0 – unit off, 1 –
unit on
General IRIDIUM_STATUS IRIDIUM_STATUS Iridium operating status
General POWER POWER Power supply voltage value (mV)
General SLEEP_MODE_STATUS SLEEP_MODE_STATUS State "Sleep mode" : 0 -
deactivated, 1 - activated
General STATUS STATUS Device status
General TEMPERATURE TEMPERATURE Internal temperature (°СС)
General TIME TIME Current time (sec) – number of
seconds elapsed since midnight
(86400 seconds in 24 hours)
General UNIX_TIME UNIX_TIME UNIX-time (sec) - number of
seconds elapsed since
January,1st 1970 (UTC)
Navigation ACCELERATION ACCELERATION Acceleration (mm/s2)
Navigation ALTITUDE ALTITUDE Altitude (m)
Navigation ANGLE ANGLE Direction angle (°С)
Navigation ANGULAR_ACC ANGULAR_ACC Angular acceleration (mm/s2)
Navigation GEOFENCE GEOFENCE Current geofence number
Navigation HDOP HDOP Horizontal delusion of precision,
multiplied by 10 (HDOP * 10)
Navigation ARE_COORDINATES_V ARE_COORDINATES_V State "GPS coordinates are
ALID ALID received" : 0 – no coordinates, 1
- coordinates are received
Navigation SATELLITES_NUMBER SATELLITES_NUMBER Number of satellites for
coordinates receiving
Navigation SPEED SPEED Значение скорости (км/ч)
Outputs OUT_0 OUT_0 State of ouput 0: 0 or 1
Outputs OUT_1 OUT_1 State of ouput 1: 0 or 1

28
Easy Logic. Scripting language description

Group Script name Algorithm name Description

Outputs OUT_2 OUT_2 State of ouput 2: 0 or 1


Outputs OUT_3 OUT_3 State of ouput 3: 0 or 1
Refrigerator FRIDGE_COMP_1_DEFR FRIDGE_COMP_1_DEFR Compartment 1. Status “defrost”
OST OST
Refrigerator FRIDGE_COMP_1_DO FRIDGE_COMP_1_DO Compartment 1. Status “door is
OR OR opened”
Refrigerator FRIDGE_COMP_1_EVAP FRIDGE_COMP_1_EVA Compartment 1. Temperature of
ORATOR PORATOR evaporator
Refrigerator FRIDGE_COMP_1_IS_O FRIDGE_COMP_1_IS_O Status “Compartment 1 is on”
N N
Refrigerator FRIDGE_COMP_1_PO FRIDGE_COMP_1_PO Compartment 1. Power mode: 0
WER_MODE WER_MODE - diesel, 1 - electric
Refrigerator FRIDGE_COMP_1_RETU FRIDGE_COMP_1_RETU Compartment 1. Temperature of
RN_AIR RN_AIR the return air
Refrigerator FRIDGE_COMP_1_RUN FRIDGE_COMP_1_RUN Compartment 1. Run mode: 0 -
_MODE _MODE cyclic, 1 - continious
Refrigerator FRIDGE_COMP_1_SET_ FRIDGE_COMP_1_SET_ Compartment 1. Set temperature
POINT POINT at the compartment
Refrigerator FRIDGE_COMP_1_SUPP FRIDGE_COMP_1_SUPP Compartment 1. Temperature of
LY_AIR LY_AIR the supplied air
Refrigerator FRIDGE_COMP_2_DEFR FRIDGE_COMP_2_DEFR Compartment 2. Status “defrost”
OST OST
Refrigerator FRIDGE_COMP_2_DO FRIDGE_COMP_2_DO Compartment 2. Status “door is
OR OR opened”
Refrigerator FRIDGE_COMP_2_EVAP FRIDGE_COMP_2_EVA Compartment 2. Temperature of
ORATOR PORATOR evaporator
Refrigerator FRIDGE_COMP_2_IS_O FRIDGE_COMP_2_IS_O Status “Compartment 2 is on”
N N
Refrigerator FRIDGE_COMP_2_PO FRIDGE_COMP_2_PO Compartment 2. Power mode: 0
WER_MODE WER_MODE - diesel, 1 - electric
Refrigerator FRIDGE_COMP_2_RETU FRIDGE_COMP_2_RETU Compartment 2. Temperature of
RN_AIR RN_AIR the return air
Refrigerator FRIDGE_COMP_2_RUN FRIDGE_COMP_2_RUN Compartment 2. Run mode: 0 -
_MODE _MODE cyclic, 1 - continious
Refrigerator FRIDGE_COMP_2_SET_ FRIDGE_COMP_2_SET_ Compartment 2. Set temperature
POINT POINT at the compartment
Refrigerator FRIDGE_COMP_2_SUPP FRIDGE_COMP_2_SUPP Compartment 2. Temperature of
LY_AIR LY_AIR the supplied air

29
Easy Logic. Scripting language description

Group Script name Algorithm name Description


Refrigerator FRIDGE_COMP_3_DEFR FRIDGE_COMP_3_DEFR Compartment 3. Status “defrost”
OST OST
Refrigerator FRIDGE_COMP_3_DO FRIDGE_COMP_3_DO Compartment 3. Status “door is
OR OR opened”
Refrigerator FRIDGE_COMP_3_EVAP FRIDGE_COMP_3_EVA Compartment 3. Temperature of
ORATOR PORATOR evaporator
Refrigerator FRIDGE_COMP_3_IS_O FRIDGE_COMP_3_IS_O Status “Compartment 3 is on”
N N
Refrigerator FRIDGE_COMP_3_PO FRIDGE_COMP_3_PO Compartment 3. Power mode: 0
WER_MODE WER_MODE - diesel, 1 - electric
Refrigerator FRIDGE_COMP_3_RETU FRIDGE_COMP_3_RETU Compartment 3. Temperature of
RN_AIR RN_AIR the return air
Refrigerator FRIDGE_COMP_3_RUN FRIDGE_COMP_3_RUN Compartment 3. Run mode: 0 -
_MODE _MODE cyclic, 1 - continious
Refrigerator FRIDGE_COMP_3_SET_ FRIDGE_COMP_3_SET_ Compartment 3. Set temperature
POINT POINT at the compartment
Refrigerator FRIDGE_COMP_3_SUPP FRIDGE_COMP_3_SUPP Compartment 3. Temperature of
LY_AIR LY_AIR the supplied air
Refrigerator FRIDGE_NO_CONNEC FRIDGE_NO_CONNEC State of connection loss with the
TION TION refrigeration unit: 0 – connected,
1 - disconnected
Refrigerator FRIDGE_TEMP_1 FRIDGE_TEMP_1 Temperature value from sensor 1
Refrigerator FRIDGE_TEMP_1_IS_AV FRIDGE_TEMP_1_IS_AV Temperature value from sensor 1
AILABLE AILABLE is available
Refrigerator FRIDGE_TEMP_2 FRIDGE_TEMP_2 Temperature value from sensor 2
Refrigerator FRIDGE_TEMP_2_IS_AV FRIDGE_TEMP_2_IS_AV Temperature value from sensor 2
AILABLE AILABLE is available
Refrigerator FRIDGE_TEMP_3 FRIDGE_TEMP_3 Temperature value from sensor 3
Refrigerator FRIDGE_TEMP_3_IS_AV FRIDGE_TEMP_3_IS_AV Temperature value from sensor 3
AILABLE AILABLE is available
Refrigerator FRIDGE_TEMP_4 FRIDGE_TEMP_4 Temperature value from sensor 4
Refrigerator FRIDGE_TEMP_4_IS_AV FRIDGE_TEMP_4_IS_AV Temperature value from sensor 4
AILABLE AILABLE is available
Refrigerator FRIDGE_TEMP_5 FRIDGE_TEMP_5 Temperature value from sensor 5
Refrigerator FRIDGE_TEMP_5_IS_AV FRIDGE_TEMP_5_IS_AV Temperature value from sensor 5
AILABLE AILABLE is available
Refrigerator FRIDGE_TEMP_6 FRIDGE_TEMP_6 Temperature value from sensor 6
Refrigerator FRIDGE_TEMP_6_IS_AV FRIDGE_TEMP_6_IS_AV Temperature value from sensor 6
AILABLE AILABLE is available

30
Easy Logic. Scripting language description

Group Script name Algorithm name Description


Refrigerator FRIDGE_TYPE FRIDGE_TYPE Refrigerator type: 1 - Carrirer , 2
- iBox , 3 - Euroscan

Appendix B. List of tag IDs in


scripting language context
Identifier Tag name Size
0x00 RS232[0] 2
0x01 RS232[1] 2
0x02 CAN8BITR0 1
0x03 CAN8BITR1 1
0x04 CAN8BITR2 1
0x05 CAN8BITR3 1
0x06 CAN8BITR4 1
0x07 CAN8BITR5 1
0x08 CAN8BITR6 1
0x09 CAN8BITR7 1
0x0A CAN8BITR8 1
0x0B CAN8BITR9 1
0x0C CAN8BITR10 1
0x0D CAN8BITR11 1
0x0E CAN8BITR12 1
0x0F CAN8BITR13 1
0x10 CAN8BITR14 1
0x11 CAN16BITR0 2
0x12 CAN16BITR1 2
0x13 CAN16BITR2 2
0x14 CAN16BITR3 2
0x15 CAN16BITR4 2
0x16 CAN32BITR0 4
0x17 CAN32BITR1 4
0x18 CAN32BITR2 4

31
Easy Logic. Scripting language description

Identifier Tag name Size


0x19 CAN32BITR3 4
0x1A CAN32BITR4 4
0x1B RS485. FLS 0. Value 2
0x1C RS485. FLS 1. Value 2
0x1D RS485. FLS 2. Value 2
0x1E RS485. FLS 3. Value 2
0x1F RS485. FLS 4. Value 2
0x20 RS485. FLS 5. Value 2
0x21 RS485. FLS 6. Value 2
0x22 RS485. FLS 7. Value 2
0x23 RS485. FLS 8. Value 2
0x24 RS485. FLS 9. Value 2
0x25 RS485. FLS 10. Value 2
0x26 RS485. FLS 11. Value 2
0x27 RS485. FLS 12. Value 2
0x28 RS485. FLS 13. Value 2
0x29 RS485. FLS 14. Value 2
0x2A RS485. FLS 15. Value 2
0x2B RS232. FLS 0. Temperature 1
0x2C RS232. FLS 1. Temperature 1
0x2D RS485. FLS 0. Temperature 1
0x2E RS485. FLS 1. Temperature 1
0x2F RS485. FLS 2. Temperature 1
0x30 RS485. FLS 3. Temperature 1
0x31 RS485. FLS 4. Temperature 1
0x32 RS485. FLS 5. Temperature 1
0x33 RS485. FLS 6. Temperature 1
0x34 RS485. FLS 7. Temperature 1
0x35 RS485. FLS 8. Temperature 1
0x36 RS485. FLS 9. Temperature 1
0x37 RS485. FLS 10. Temperature 1
0x38 RS485. FLS 11. Temperature 1
0x39 RS485. FLS 12. Temperature 1
0x3A RS485. FLS 13. Temperature 1

32
Easy Logic. Scripting language description

Identifier Tag name Size


0x3B RS485. FLS 14. Temperature 1
0x3C RS485. FLS 15. Temperature 1
0x3D CAN8BITR15 1
0x3E CAN8BITR16 1
0x3F CAN8BITR17 1
0x40 CAN8BITR18 1
0x41 CAN8BITR19 1
0x42 CAN8BITR20 1
0x43 CAN8BITR21 1
0x44 CAN8BITR22 1
0x45 CAN8BITR23 1
0x46 CAN8BITR24 1
0x47 CAN8BITR25 1
0x48 CAN8BITR26 1
0x49 CAN8BITR27 1
0x4A CAN8BITR28 1
0x4B CAN8BITR29 1
0x4C CAN8BITR30 1
0x4D CAN16BITR5 2
0x4E CAN16BITR6 2
0x4F CAN16BITR7 2
0x50 CAN16BITR8 2
0x51 CAN16BITR9 2
0x52 CAN16BITR10 2
0x53 CAN16BITR11 2
0x54 CAN16BITR12 2
0x55 CAN16BITR13 2
0x56 CAN16BITR14 2
0x57 CAN32BITR5 4
0x58 CAN32BITR6 4
0x59 CAN32BITR7 4
0x5A CAN32BITR8 4
0x5B CAN32BITR9 4
0x5C CAN32BITR10 4

33
Easy Logic. Scripting language description

Identifier Tag name Size


0x5D CAN32BITR11 4
0x5E CAN32BITR12 4
0x5F CAN32BITR13 4
0x60 CAN32BITR14 4
0x61 PressurePro 2*34
0x62 UserTag_0 4
0x63 UserTag_1 4
0x64 UserTag_2 4
0x65 UserTag_3 4
0x66 UserTag_4 4
0x67 UserTag_5 4
0x68 UserTag_6 4
0x69 UserTag_7 4
0x6A UserArray Lower byte =
array length
0x6B Refrigerator data Structure is
identical to
one described
in the
Galileosky
protocol
description
0x6C CAN_A0 4
0x6D CAN_A1 4
0x6E CAN_B0 4
0x6F CAN_B1 4

34

You might also like