Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Reading Multiple Strings from GPS16-HVS with CR23X


Quinton Kirsch Sep 14, 2022 05:29 PM

Hi all,

I know this is a total shot in the dark here but it's somewhat of a last resort:

Iim running a CR23X (older model with grey hard mounted wire terminals if that matters) reading data from a GPS16-HVS. The PPS signal is used to execute the program. Logger is running the PakBus OS and GPS is outputting GGA and VTG strings.

1: Port Serial I/O (P15)
1: 1 Reps
2: 64 -- RS-232 ASCII (decimal delimiter), 9600 Baud
3: 1 Delay (0.01 sec units) before TX
4: 5 No RTS/DTR, C5 TXD/RXD
5: 1 Start Loc for TX [ GGA_TIME ]
6: 0 Number of Locs to TX
7: 42 Termination Character for RX
8: 124 RX Buffer Size or Max Chars to RX if Par 2 indexed (--)
9: 100 Time Out for CTS (TX) and/or RX (0.01 sec units)
10: 1 Start Loc for RX [ GGA_TIME ]
11: 1.0 Multiplier for RX
12: 0.0 Offset for RX

Using a single extended parameter instruction to filter the GPGGA string:

2: Extended Parameters (P63)
1: 36 Option  ;$
2: 71 Option  ;G
3: 80 Option  ;P
4: 71 Option  ;G
5: 71 Option  ;G
6: 65 Option  ;A
7: 00 Option
8: 00 Option

It works no problem, with the decimal delimiter set in Instruction 15, each numerical value parsed to each InLoc etc etc. Totally works fine. The program is functionally the same to that of what's found within the manuals for the CR23X and GPS16-HVS. Now, trying to read a second string, in this case the GPVTG string, it will not read it. Even duplicating Instruction 15 and setting the Start Loc for RX to the first VTG InLoc, it only puts -INF as to denote "a very large number." (Or so I assume. Or in this case, an unreadable value..?) Double checked the ASCII decimal equivalent numbers as well, all the same.

I've pretty much exhausted all of my options. Changed bauds, changed strings, made sure firmware was up to date. Made sure connections were solid, PPS correctly set, changed the input strings to ensure it wasn't an overrun error. Even changed actual data loggers with no luck. I must be overlooking an extremely simple detail here. I know CSI stopped support of Edlog and the retired loggers a while ago but maybe someone had a similar problem and had it resolved..? And I know..."just upgrade, it'll be easier." I don't really have the luxury or funds to upgrade unfortunately. Just trying to make what I have work on a shoe string budget.

Hopefully someone knows what's going on.

For reference here's the program I'm using as a testbed for reading the data:

;{CR23X-TD}
;
*Table 1 Program
01: 1.0000 Execution Interval (seconds)

1: If Flag/Port (P91)
1: 48 Do if Port 8 is High
2: 98 Call Subroutine 98

*Table 2 Program
02: 0.0000 Execution Interval (seconds)

*Table 3 Subroutines

1: Beginning of Subroutine (P85)
1: 98 Subroutine 98

;$ 36
;G 71
;P 80
;G 71
;G 71
;A 65

;$ 36
;G 71
;P 80
;R 82
;M 77
;C 67

;$ 36
;G 71
;P 80
;V 86
;T 84
;G 71

2: Port Serial I/O (P15)
1: 1 Reps
2: 64 -- RS-232 ASCII (decimal delimiter), 9600 Baud
3: 1 Delay (0.01 sec units) before TX
4: 5 No RTS/DTR, C5 TXD/RXD
5: 1 Start Loc for TX [ GGA_TIME ]
6: 0 Number of Locs to TX
7: 42 Termination Character for RX
8: 124 RX Buffer Size or Max Chars to RX if Par 2 indexed (--)
9: 100 Time Out for CTS (TX) and/or RX (0.01 sec units)
10: 1 Start Loc for RX [ GGA_TIME ]
11: 1.0 Multiplier for RX
12: 0.0 Offset for RX

3: Extended Parameters (P63)
1: 36 Option
2: 71 Option
3: 80 Option
4: 71 Option
5: 71 Option
6: 65 Option
7: 0 Option
8: 0 Option

4: Extended Parameters (P63)
1: 36 Option
2: 71 Option
3: 80 Option
4: 86 Option
5: 84 Option
6: 71 Option
7: 0 Option
8: 0 Option

;LATITUDE
5: Z=X*F (P37)
1: 3 X Loc [ GGA_LATDEC ]
2: 0.0001 F
3: 3 Z Loc [ GGA_LATDEC ]

6: Z=X+Y (P33)
1: 2 X Loc [ GGA_LATINT ]
2: 3 Y Loc [ GGA_LATDEC ]
3: 31 Z Loc [ LATITUIDE ]

;LONGITUDE
7: Z=X*F (P37)
1: 5 X Loc [ GGA_LNGDEC ]
2: 0.0001 F
3: 5 Z Loc [ GGA_LNGDEC ]

8: Z=X+Y (P33)
1: 4 X Loc [ GGA_LNGINT ]
2: 5 Y Loc [ GGA_LNGDEC ]
3: 32 Z Loc [ LONGITUDE ]

;ALTITUDE

9: Z=X*F (P37)
1: 11 X Loc [ GGA_ALTDEC ]
2: 0.1 F
3: 11 Z Loc [ GGA_ALTDEC ]

10: Z=X+Y (P33)
1: 10 X Loc [ GGA_ALTINT ]
2: 11 Y Loc [ GGA_ALTDEC ]
3: 33 Z Loc [ ALTITUDE ]

11: Z=X (P31)
1: 6 X Loc [ GGA_QUALITY ]
2: 34 Z Loc [ QUALITY ]

12: Z=X (P31)
1: 7 X Loc [ GGA_NUMSATS ]
2: 35 Z Loc [ NUM_SATELLITES ]

13: Data Table (P84)^320
1: 0.0 Seconds into Interval
2: 0 Each Time This Instruction Executes (with Time Stamp)
3: 0.0 (0 = auto allocate, -x = redirect to inloc x)
4: GPS_TIME_SAMPLE Table Name

14: Resolution (P78)
1: 1 High Resolution

15: Sample (P70)^11740
1: 1 Reps
2: 1 Loc [ GGA_TIME ]

16: Sample (P70)^22601
1: 1 Reps
2: 31 Loc [ LATITUIDE ]

17: Sample (P70)^19217
1: 1 Reps
2: 32 Loc [ LONGITUDE ]

18: Sample (P70)^32530
1: 1 Reps
2: 34 Loc [ QUALITY ]

19: Sample (P70)^16944
1: 1 Reps
2: 35 Loc [ NUM_SATELLITES ]

20: Sample (P70)^8137
1: 1 Reps
2: 33 Loc [ ALTITUDE ]

21: End (P95)

End Program

-Input Locations-
1 GGA_TIME 1 3 2
2 GGA_LATINT 1 1 0
3 GGA_LATDEC 1 2 1
4 GGA_LNGINT 1 1 0
5 GGA_LNGDEC 1 2 1
6 GGA_QUALITY 1 1 0
7 GGA_NUMSATS 1 1 0
8 GGA_HDOPINT 1 0 0
9 GGA_HDOPDEC 1 0 0
10 GGA_ALTINT 1 1 0
11 GGA_ALTDEC 1 2 1
12 GGA_GEOIDINT 0 0 0
13 GGA_GEOIDDEC 1 0 0
14 GGA_AGEINT 1 0 0
15 GGA_AGEDEC 1 0 0
16 GGA_DIFFID 1 1 1
17 VTG_TCINT 1 6 4
18 VTG_TCDEC 1 0 0
19 VTG_MAGCINT 1 0 0
20 VTG_MAGVDEC 1 0 0
21 VTG_SOGINTKTS 0 0 0
22 VTG_SOGDECKTS 1 0 0
23 VTG_SOGINTKPH 1 0 0
24 VTG_SOGDECKPH 1 0 0
25 ______________ 1 0 0
26 ______________ 1 0 0
27 ______________ 1 0 0
28 ______________ 1 0 0
29 ______________ 1 0 0
30 ______________ 1 0 0
31 LATITUIDE 1 1 1
32 LONGITUDE 1 1 1
33 ALTITUDE 1 1 1
34 QUALITY 1 1 1
35 NUM_SATELLITES 1 1 1
36 ______________ 1 0 0
37 ______________ 1 0 0
38 ______________ 1 0 0
39 ______________ 0 0 0


JDavis Sep 14, 2022 06:58 PM

The order of the strings is what is causing you trouble. The serial buffer in the CR23X will be linear. You have to read the strings out in the order they would be in the buffer.

Newer datalogger models have serial ring buffers that you configure. The ring buffers allow multiple read pointers, for multiple strings. Of course, the GPS() instruction in the newer loggers makes it much simpler.

Log in or register to post/reply in the forum.