![Nokeval FTR970-PRO User Manual Download Page 21](http://html1.mh-extra.com/html/nokeval/ftr970-pro/ftr970-pro_user-manual_1699205021.webp)
21
Serial commands
In case PromoLog is not used for reading data from the device, following commands can be used to
read data from device.
Following commands are usable for reading channel information. Different protocols are fully ex-
plained in their own chapters, here is a quick summary of each protocols available commands.
Nokeval SCL protocol
Reading with Nopsa command over SCL protocol.
Modbus RTU protocol
Reading with Nopsa command over Modbus RTU protocol.
Nokeval Nopsa commands (transport protocol SCL or Modbus RTU)
4/0 (Buffer info)
Read buffer size and current write position
4/1 (Find oldest from buffer)
Move read position to oldest entry in buffer
4/2 (Find newest from buffer)
Move read position to newest entry in buffer
4/3 (Read buffer with index)
Read specifi c data entry from buffer
4/4 (Read next from buffer)
Read data entry from buffer and move read position to next
4/5 (Reread last)
Returns last read operation contents
Preferred way to read buffer is by using commands 4/4 and 4/5. First read next from buffer with com-
mand 4/4 and in case of serial transmission error last read entry is asked again by command 4/5.
Commands return also read position and lap counter.
Command 4/3 is only preferred in case the transfer layer in the reading program is queued, which
means that multiple commands are input to queue before response arrives. In that case when serial
transmission error happens then buffer reread can not be used, so it’s safer to keep track of read
index implicitly. This method is normally not preferred.
Buffer is organized as a ring buffer and when read position reaches write position which means there
are no new data, then commands return empty response packet.
Data structure
Data structure in buffer is following. Note! This presents only the actual data in data fi eld, other parts
of Nopsa packet is explained in chapter Nopsa. Device can return 2 different packets, both of which
are below.
Data type
STRUCT
Struct type
0 (raw radio data packet)
Device type
1 byte, integer, see table on page 19
Signal strength
1 byte, integer. Subtract 127 to get result in dBm.
Bytes + battery
1 byte, 3 msb data bytes, 5 lsb battery voltage.
Divide battery by 10 to get result in volts.
Data bytes
0-7 bytes. Information is dependent on device type.