LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lost nearly 7min of data, what is causing the jumps?


@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:

  1. Transition from the Verified State to the reserved state
  2. Transition from the reserved state to the committed state
  3. Transition from the commited Stat to the Run State
  4. acquire about 1 second of data as timed by the device onboard clock
  5. Transition back to the commited state
  6. Transition back to the reserve state
  7. Transition back to the verified state
  8. Spit out data

This takes longer than 1 second on your machine


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 15
(751 Views)
  • Use lower level DAQ and read DBLs (no dymanic data). Get the timestamp locally. I agree that hardware timed continuous acq would the the correct thing.
  • 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?)
  • Why is your queue element a cluster of arrays instead of a cluster of scalars?
  • 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!)?
  • 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 inside 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.
  • Why is the queue in shift registers?
  • ...
0 Kudos
Message 12 of 15
(747 Views)

@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.....

0 Kudos
Message 13 of 15
(743 Views)

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?

0 Kudos
Message 14 of 15
(728 Views)

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

0 Kudos
Message 15 of 15
(717 Views)