05.03.2014 Views

ekS - Instytut Agrofizyki im. Bohdana Dobrzańskiego PAN w Lublinie ...

ekS - Instytut Agrofizyki im. Bohdana Dobrzańskiego PAN w Lublinie ...

ekS - Instytut Agrofizyki im. Bohdana Dobrzańskiego PAN w Lublinie ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

sensor, format the data received from the sensor and setting the SLAVE device<br />

into the sleep mode for a given period of t<strong>im</strong>e. The beginning of the script is<br />

marked by [beg] and the end by [end] directives.<br />

Table 17. An example of the executable script file with the sequence of commands controlling the<br />

MIDL data logger<br />

[beg]<br />

port(9600)<br />

filename("RS485t.txt")<br />

outp(RS485,"Command sent to the work interface RS485 \n\r")<br />

fprintf("Result of the measurement received by RS485: ")<br />

inp(RS485,14,4000)<br />

sleep(120)<br />

[end]<br />

When the defined period of t<strong>im</strong>e, when the device is in the sleep mode,<br />

terminates, the script file executes from the beginning.<br />

The script commands for autonomic, cyclic control measurements by the<br />

SLAVE device are presented in Table 18.<br />

Each sensor connected to the SLAVE module should “understand” the script<br />

commands. This requires that each sensor is provided with an appropriate<br />

hardware and software interface. Therefore the term “sensor” means a device<br />

converting the analysed signal (ex temperature, pressure, electrical conductivity,<br />

etc.) into the corresponding electrical signal.<br />

Table 18. Script file commands for MIDL data logger control<br />

Command<br />

port(baudrate, databits,<br />

stopbits, paritychecking);<br />

outp(port, “data”);<br />

inp(port, length, wait);<br />

filename(“name”);<br />

sleep(sec);<br />

fprintf(”format”);<br />

Description<br />

Setting parameters of the serial port<br />

Sending data by the working interface<br />

Receiving data from the working interface<br />

Setting the file name where the data received from<br />

working interfaces will be stored<br />

Bringing the MIDL into the sleep mode for defined<br />

number of seconds<br />

Introduction of additional formatted data into the<br />

output file<br />

117

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!