12-02-2012 09:31 PM
Hi Everyone,
I'm a realtively limited user... DASYlab 11, Basic. I'm attempting to read some RS232 data and create plots of several variables having to do with an aircraft engine. (This is a hobby project, not for professional use or profit.)
I'm reading the RS232 data it appears alright with the input module. I'm also using a virtual RS232 terminal as a temporary input while I debug my DASYlab worksheet. I'm then parsing the data into 4 channels and displaying the results on a Digital Display module. Up until that point, things seem to be working fine. The problem is when I take the data from the output of the Display module and input it into a Y/t Chart it does not appear on the Y/t Chart. I've put a copy of a screen capture on dropbox here..
https://dl.dropbox.com/u/89576457/Screen%20Shot%202012-12-02%20at%209.58.52%20PM.png
I've tried running another input into the Y/t Chart with success just as a test.... from the Analog Input of my sound card. That's works fine...
I'm feeding a data stream into the RS232 port about every 3 seconds. I can increase the feed rate. So far, the data appears on the digital display as it should and even on the input lines to the Y/t module, but I don't get any data plotting.
Any ideas on what I may be doing wrong?
Any assistance would be greatly appreciated. This a hobby project having to do with plotting real time data for an aircraft engine... not for professional use or profit.
Dave
Solved! Go to Solution.
12-03-2012 07:47 AM
Hi,
The RS232 module is going to create a relatively slow channel, with a block size of 1.
The Y/t Chart displays whole blocks at a time, and is not well suited to slow data and small block sizes.
Use the Chart Recorder or the Diagram module configured for Chart Recorder. You'll get a complete display. In the Chart Recorder, you may need to "Connect Trigger Events", since the RS232 data is tagged as triggered. (It's triggered so that modules are aware that the data points and blocks may not be perfectly equidistant).
12-03-2012 09:38 PM
CJ
The Chart Recorder idea worked well. Thank you so much...
However, I'm still having a slight problem parsing the RS232 data. It's comma delimited. Below is a sample record. Each record begins with the BBDR, OFF, UBG...and has a <CR> at the end. The data of interest begins with the "1396". I'd like to skip the first three fields (BBDR, OFF, UBG) then parse the next 8 values into separate channels of the RS232 Module.
BBDR,OFF,UBG,1396,370,1408,326,1240,370,1376,394,1360,373,1426,366,80
Here are the "measurement data format" strings I'm using in the RS232 module for channels 0-3 as an example. I'm not sure I understand the data formats and don't seem to be able to find instructions on it, so I've tried some a couple of things from examples.
CH0:
"BBDR"9xc4a
CH1:
1xc3a
CH2:
1xc4a
CH3:
1xc3a
Etc., Etc.
This seems to work as long as the data looks exactly like the above. The problem is the numberic values can change from 900 to 1500 F, meaning they're not always the same length. How do I get the module to read the numberic value between the comas, regardless of number of digits...
Thanks for you help... I've at least got the program running...
12-04-2012 10:07 AM
I would do the following:
BBDR,OFF,UBG,1396,370,1408,326,1240,370,1376,394,1360,373,1426,366,80
Channel 0: "BBDR,OFF,UBG," a\x2c
Channel 1..7: a\x2c
Then the rest of the line is ignored, looking for the search string.
\x2c is the hex representation for the comma character, and you can use it to delimit the text. DASYLab will try to interpret the characters as a number up to the comma.
12-04-2012 09:36 PM
Thank you so much CJ... Got her working!
Now to pretty it up!
Dave