04-17-2014 10:09 AM
Hello everyone.
I'am new to the use of DASYLab, but I was able to create a worksheet to capture data coming from RS232 port.
The RS232 module has 6 channels (0 to 5)
Chan 0 = Reading number
Chan 1 = PASS1
Chan 2 = PASS 2
Chan 3 = AVG
Chan 4 = AVG LOW
Chan 5 = GRADE
The data coming is in the following order:
<LF><CR>
RDG NO PASS1 PASS2 AVG<LF><CR><LF>
<CR>
001 4.17 1.21 2.69<LF><CR>
002 1.06 1.47 1.26<LF><CR>
003 0.92 1.70 1.31<LF><CR>
004 0.81 1.70 1.25<LF><CR>
005 0.72 1.73 1.22<LF><CR>
006 0.85 1.51 1.18<LF><CR>
007 1.10 1.41 1.25<LF><CR>
008 0.93 1.38 1.15<LF><CR>
009 1.02 1.31 1.16<LF><CR>
010 1.03 1.24 1.13<LF><CR>
011 1.01 1.30 1.15<LF><CR>
012 1.54 1.50 1.52<LF><CR>
013 1.56 1.61 1.58<LF><CR>
014 1.58 1.67 1.62<LF><CR>
015 ---- ---- ----<LF><CR><LF>
<CR>
LOW AVG 0.00 GRADE 7<LF><CR><LF>
<CR>
LIMIT 1 0.50<LF><CR>
LIMIT 2 0.60<LF><CR>
LIMIT 3 0.70<LF><CR>
I have managed to visualize correctly the "LOW AVG" value and the "GRADE" value.
I have a list module to show in screen the 15 incoming values and then write them to a file. The problem is how to set the data format so all the data is shown into the list module under their respective channel. i.e. Cahnnel 0 shows all the values (001 to 015) and so on for the remaining channels (except for Chan 4 and 5).
Hope you can help me out with this.
Greetings.
04-21-2014 09:33 AM
I tried a couple of things, but if the header line repeats, it's going to be really hard to parse.
DASYLab is looking for a very regular RS232 string, and this is not regular.
It might be possible to write a script using the DASYLab V13 script feature.
04-21-2014 09:37 AM
Thanks CJ.
I'll be waiting for your reply.
Greetengs.