Section 5. Programming the Datalogger
5-17
6: End (P95)
;get two floating point numbers into locations 1 and 2.
7: SDM-SIO4 (P113)
1:
1
Reps
2:
0
Address
3:
1
Send/Receive Port 1
4:
4
Command
5:
0
1st Parameters
6:
0
2nd Parameters
7:
2
Values per Rep
8:
1
Loc [ Number ]
9:
1.0
Mult
10: 0.0
Offset
*Table 2 Program
02: 0.0000
Execution Interval (seconds)
*Table 3 Subroutines
End Program
The normal configuration would include setting the speed and serial data
format by calling the datalogger instruction with command 2049 and the
relevant parameters.
For the majority of sensor applications where data is returned in only one type
of format to the SDM-SIO4, the receive data format filters can also be defined
once only by using command 2054. Similarly, some sensors may also require
set-up strings to be sent once; these actions can also be placed in the same
configuration block.
There are two general methods of obtaining data from an intelligent RS232
device, depending on the sensor type, as indicated below:
5.3.1 Sensors Where the Datalogger Can Request Data by
Sending a Prompt or Using a Handshaking Line
For these sensors the measurement would consist of three phases:
1.
For software-controlled sensors, use the datalogger instruction to send out a
command string (to request data), using commands 0320, 1024, 1025 or
2304. (Command 2304 also allows you to set up the receive filter to match
the expected data; this instruction is useful when several different types of
data are being requested from the sensor, i.e. a one-off set-up of the receive
filter with command 2054, is not appropriate.) For hardware-controlled
sensors, use command 1027 to change the state of the handshaking lines.
2.
The datalogger waits for a period long enough for the SDM-SIO4 to process
the set-up data (minimum delay), plus time for the data to be transmitted out
of the serial port, plus the time for the sensor to respond and the data string
to be transmitted back to the SDM-SIO4. The delay can either be instigated
Summary of Contents for SDM-SIO4
Page 6: ...SDM SIO4 Table of Contents iv This is a blank page ...
Page 12: ...Section 1 Introduction 1 6 This is a blank page ...
Page 16: ...Section 2 Installation and Hardware Set Up 2 4 This is a blank page ...
Page 26: ...Section 3 Understanding How the SDM SIO4 Handles Data 3 10 This is a blank page ...
Page 32: ...Section 4 Programming the SDM SIO4 4 6 This is a blank page ...
Page 62: ...Section 5 Programming the Datalogger 5 30 This is a blank page ...
Page 76: ...This is a blank page ...
Page 81: ...This is a blank page ...