LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI6009 and VISA

Dear All

 

Today I try to mix 2 VIs in one.

One VI works with an arduino with an encoder for distance measumerent. It works fine.

Other VI is a 3 axis accelerometer connected to the NI6009 and it works fine alone.

After mix the VIs the accelerometer signal is ok, but the VISA  data starts with a 20s or more after starting the code.

Should this works fine? Or I need the build 2 while loops side to side? And in each saving data for 2 files and after that combine data with time.

 

I need to measure distance in a small road and at the same time measure the Z acceleration.

 

Best regards

CPalka

 

 

0 Kudos
Message 1 of 5
(1,000 Views)

Hi cpalka,

 


@cpalka wrote:

After mix the VIs the accelerometer signal is ok, but the VISA  data starts with a 20s or more after starting the code.

Should this works fine?


This should work fine, even without that delay…

 


@cpalka wrote:

Or I need the build 2 while loops side to side? And in each saving data for 2 files and after that combine data with time.


It would help to see your VI(s) to give an answer to your question…

I guess there will be a solution that does not involve creation of 2 files just to merge them later on.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(995 Views)

Hi GerdW

 

Here is my example in LB 2013 that result from other VIs

It has from NI6009 3 axis accelerometer (only use Z axle) and IR thermometer.

From arduino nano, by visa port receives the pulses from an encoder.

 

I attach the secound file (2 loops) that works fine but it is difficult syncronize the signals.

 

Sorry for the confusiton of the VI 🙂

 

Best regards

CPalka

Download All
0 Kudos
Message 3 of 5
(956 Views)

Hi cpalka,

 


@cpalka wrote:

It has from NI6009 3 axis accelerometer (only use Z axle) and IR thermometer.

From arduino nano, by visa port receives the pulses from an encoder.

 

I attach the secound file (2 loops) that works fine but it is difficult syncronize the signals.


Unfortunately my LV2016 says it cannot open the properties dialog of your DAQAssistent.

(IMHO you are using way too many ExpressVIs in your VI…)

 

You cannot sync signals from serial port and from your DAQ device. All you can do is to save a timestamp with each signal, so you can align them in postprocessing. But the general approach of using two loops for your data acquisition is the correct one (in my opinion).

 

I recommend to rework your VI for better coding standards, like:

  • using BuildPath to build a path (instead of StringConcat)
  • do numeric rounding instead of converting to string and back to number
  • apply scaling to your DAQmx channels within DAQmx
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(937 Views)

Hi GerdW

 

Many thanks

I will make modifications as You suggest.

 

Best regards

CPalka

0 Kudos
Message 5 of 5
(927 Views)