02-22-2023 07:51 AM
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
02-22-2023 07:59 AM
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.
02-22-2023 03:01 PM - edited 02-22-2023 03:03 PM
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
02-23-2023 01:04 AM - edited 02-23-2023 01:07 AM
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:
02-23-2023 02:41 AM
Hi GerdW
Many thanks
I will make modifications as You suggest.
Best regards
CPalka