DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

How to parse comma delimited data?

Solved!
Go to solution

Hi!

I have a problem while parsing comma delimited data. My oscilloscope transfers 1002 data points via the RS232 interface which are comma delimited. In addition they have a variable length where positive values have 8 bits and negative ones 9. So parsing with a fixed length is hardly possible. I tried a variety of solutions for the measurement format like a\x2C but with no success. I can see the data in the RS232 monitor but how can I work with it in the Dasylab sheet?

 

Thanks for your help!

0 Kudos
Message 1 of 13
(7,783 Views)

a\x2c  (note the case) should work.

 

 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 13
(7,781 Views)
Already tried it this way. My problem is that the RS232 shows the correct value in the monitor mode but it won't transfer the values to any other module like the write module in the Dasylab sheet.
0 Kudos
Message 3 of 13
(7,775 Views)

How does the line terminate? 

 

It looks like it's finding the value in the monitor... as you said. How is the module configured? can you attach the worksheet or images of all of the settings.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 4 of 13
(7,773 Views)

I tried to make some screenshots of the module. The worksheet itself is not of interest I think. The line ends with \r\n

Download All
0 Kudos
Message 5 of 13
(7,770 Views)

The (output) timebase is set to 15 seconds ( < 1Hz) with bocksize 1002 -- this will take several minutes to fill a single block.

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 6 of 13
(7,738 Views)

For a test, reduce your sample rates to 1/second, with a block size of 1. You can use a Data Window module to recollect them back into a larger block if it works.

 

Additionally, if this does not work, try changing the INTERFACE settings for the hardware handshake to one of the three bottom choices (in English, they say "Without". These settings hold one or two pins high or low, for some devices that expect that. Try each one in turn, to see if it works. This is a common solution.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 7 of 13
(7,721 Views)

Another problem is, that the entire data record is terminated by \r\n, but the data values itself are seperated by commas.

The last data value (the one between the last comma and the \r\n) will stay in the buffer while DASYLab waits for the next comma to arrive - forever, or until someone resets the buffer (action-module).

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 8 of 13
(7,717 Views)

I tried all handshaking methods but that didn't help. I also tried a sampling rate of 1 s and a block size of 1, but allthough I have a bunch of data (1002 data points) in the RS232 monitor I only get one single value in a linked list module. This value does only change if I send another data request. I used the data format a\x2c. Any further ideas? I really need help with this.

0 Kudos
Message 9 of 13
(7,709 Views)

What happens, if you move the data-request from the channel into the "Start-Kommando"-field, and deactivate the "active data-request"-option, too?

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
0 Kudos
Message 10 of 13
(7,700 Views)