11-25-2014 01:46 PM
@labview12110 wrote:
the onyl thing i want is a data point every second. have i not set it up this way? the serial port response is using an ni usb232 2 port box which is connected to two devices.
No you haven't you have the DAQ Assistant set up to:
This takes longer than 1 second on your machine
11-25-2014 01:48 PM - edited 11-25-2014 01:54 PM
11-25-2014 01:52 PM - edited 11-25-2014 02:00 PM
@altenbach wrote:
- Use lower level DAQ and read DBLs (no dymanic data). Get the timestamp locally.
- Use proper representation for the minutes and seconds indicator (I32)
- Why do you write to the same VISA resource (COM3) twice in parallel? (or are these two different ports once configured correctly?)
There are two devices connected, i change the com port depending on what is plugged in.
- Why is your queue element a cluster of arrays instead of a cluster of scalars?
if i didnt put my scalars into an array first the tdms file would never write properly and would just put everything into a single column instead of under the differnet headings.
- Why do you read from the i-2 shift register, forcing the need to account for another factor of two?
- Why is the front panel and diagram maximised to the screen (very annoying!)?
what do you mean?
- You have a race condition because there is no guarantee that the "record data" button resets via the property node before the current value is read isnide the loop. You probably don't need to reset the indicator.
- You don't need to trim "data" and "lpm" from the received string. Just wire an appropriate offset to fract/exp string to number.
But the serial read brings in a long string with the number i want to record between those so i want to trim off the text and just get the number. i cant always gurantee that the string length will be the same since the decimal number changes and can have more less sigfigs depending on the moment in time.
- Why is the queue in shift registers?
- ...
I answered the question I understood.....
11-25-2014 02:07 PM - edited 11-25-2014 02:08 PM
Well, OK, maybe you need to start after data. Still simpler. (simpler code means there are fewer places where bugs can hide :D)
Can you show an example string?
11-25-2014 02:11 PM - edited 11-25-2014 02:15 PM
I asked this question a while ago the method i used is what worked at the time
http://forums.ni.com/t5/LabVIEW/How-to-read-line-by-line-from-serial-input/m-p/2845080#M830688
i changed most of the things you mentioned as well, will post an updated vi in a sec