Good morning Ted,
It should be possible if the data is ASCII text or high endian binary and the data is transmitted by RS232, RS422, RS485 or SDI12 standards.
This is my SOP for serial sensor port work.
RTM. Read the manual for the device.
You will need to take note of things like; default configurations, special transfer modes that may make your life easier, Communication type (RS232, RS485?), Comms settings (baud rate parity, Xon/Xoff etc). Look for header characters, parsing characters and end of line markers. Do you have to send commands to get data or does it just spit it out?
Get hold of a sample of data from the device (or construct some test data yourself). What I do is use a terminal program to send this data to the datataker and using the P56 parameter to look at the data coming in and how the DT800 is parsing it. (P56=1 will show the incoming string, P56=8 will show the parsing, etc) Use this to construct and check you parsing is correct.
Then hook up the device and check that works as expected.
For example the following DeTransfer program will read a GPS string.
'The 2 line NMEA0183B output is:
'
' $GPRMC,051151,A,3655.85,S,14458.99,E,21.7,215.1,290301,11.,E*54\13\10
' $GPRMB,A,0.00,R,0000,0001,3656.54,S,14500.00,E,001.5,00..,021.7,V*1B\13\10
'
'where in line 1 the 3655.85,S is the latitude and 14458.99,E is the longitude
PS=4800,N,8
BEGIN
1SERIAL(RS232,"\\e",W) 'Clean out receive buffer
RA1SERIAL"$GPRMC" 'Trigger on header
DELAY(W)=500 'Wait for all of string to come in
1SERIAL(RS232,"%16s[1$]",2,W) 1$("Header:")
1SERIAL(RS232,"%f[1CV],",2,W) 1CV("Latitude =",FF4)=1CV/100
1SERIAL(RS232,"%1s[2$],",2,W) 2$("")
1SERIAL(RS232,"%f[2CV],",2,W) 2CV("Longitude =",FF4)=2CV/100
1SERIAL(RS232,"%1s[3$]",2,W) 3$("")
1SERIAL(RS232,"\\e",2,W)
END
Good morning Ted,
It should be possible if the data is ASCII text or high endian binary and the data is transmitted by RS232, RS422, RS485 or SDI12 standards.
This is my SOP for serial sensor port work.
1. RTM. Read the manual for the device.
You will need to take note of things like; default configurations, special transfer modes that may make your life easier, Communication type (RS232, RS485?), Comms settings (baud rate parity, Xon/Xoff etc). Look for header characters, parsing characters and end of line markers. Do you have to send commands to get data or does it just spit it out?
2. Get hold of a sample of data from the device (or construct some test data yourself). What I do is use a terminal program to send this data to the datataker and using the P56 parameter to look at the data coming in and how the DT800 is parsing it. (P56=1 will show the incoming string, P56=8 will show the parsing, etc) Use this to construct and check you parsing is correct.
3. Then hook up the device and check that works as expected.
For example the following DeTransfer program will read a GPS string.
````
'The 2 line NMEA0183B output is:
'
' $GPRMC,051151,A,3655.85,S,14458.99,E,21.7,215.1,290301,11.,E*54\13\10
' $GPRMB,A,0.00,R,0000,0001,3656.54,S,14500.00,E,001.5,00..,021.7,V*1B\13\10
'
'where in line 1 the 3655.85,S is the latitude and 14458.99,E is the longitude
PS=4800,N,8
BEGIN
1SERIAL(RS232,"\\e",W) 'Clean out receive buffer
RA1SERIAL"$GPRMC" 'Trigger on header
DELAY(W)=500 'Wait for all of string to come in
1SERIAL(RS232,"%16s[1$]",2,W) 1$("Header:")
1SERIAL(RS232,"%f[1CV],",2,W) 1CV("Latitude =",FF4)=1CV/100
1SERIAL(RS232,"%1s[2$],",2,W) 2$("")
1SERIAL(RS232,"%f[2CV],",2,W) 2CV("Longitude =",FF4)=2CV/100
1SERIAL(RS232,"%1s[3$]",2,W) 3$("")
1SERIAL(RS232,"\\e",2,W)
END
````