From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

use of analog and digital channel synchronously in DAQ 6361

Hii,

I am using DAQ 6361 for data acquisition.I need to use both,digital channels and  analog channel.based on analog signal and digital signal overlap I have to do some task. for that these 2 channel should work in  synchronous way.I am using seperate daq assistant for taking analog and digital signals in my Labview program(because 1 Daq assistant can be used for only one type of signal,  either it is analog or digital that is why 2 daq assistants are required).I have applied same start trigger for both Daq assistant .In this case the analog and digital signal should start from same time or with some fixed delay.But when I run the program ,every time they start randomly and  delay is random.It seems they are running independently.Can anyone suggest me that how can we take analog and digital signal in synchronous way?how do I ensure that they will  start from same time?

 

I have attched the figure in which  you can see that digital signals and analog channel are working independently.

  

0 Kudos
Message 1 of 13
(1,808 Views)

Hi poojap,

 


@poojap wrote:

because 1 Daq assistant can be used for only one type of signal,  either it is analog or digital that is why 2 daq assistants are required)


The DAQAssistent is NEVER required: use plain DAQmx functions instead!

 


@poojap wrote:

I have applied same start trigger for both Daq assistant .In this case the analog and digital signal should start from same time or with some fixed delay.But when I run the program ,every time they start randomly and  delay is random.It seems they are running independently.Can anyone suggest me that how can we take analog and digital signal in synchronous way?how do I ensure that they will  start from same time?


Did you examine all those example VIs coming with LabVIEW and DAQmx? They explain how to sync different DAQmx tasks!

Best regards,
GerdW


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

Thankyou for reply.

I tried with DAQmx function also ,same problem was coming in this case also.since I have to aquire many signal so I had to creat many channel If I would use Daqmx function,that is why I am using DAQ assistant.I followed examples but did not found any related thing.In the examples mostly they expalined about same type of input(analog-analog).when I use analog -analog channel ,digital-digital channel then this problem is not coming.when using 2 diffternt type of signal only then this mismatching happens.

please suggest!!

0 Kudos
Message 3 of 13
(1,798 Views)

Hi poojap,

 


@poojap wrote:

when using 2 diffternt type of signal only then this mismatching happens.

please suggest!!


To get better advice you should attach your current code. (Not just images ofr code, but real code!)

Best regards,
GerdW


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

Thankyou for reply.Please find attached vi.

 

 

Download All
0 Kudos
Message 5 of 13
(1,781 Views)

Hi poojap,

 

there is no sync at all between those two DAQmx tasks!

Please re-examine all the example VIs explaining those DAQmx features…

 

Keep in mind: reading data at 100kS/s from two tasks will stress the USB connection to your DAQ device quite a lot. You cannot expect miracles from an old USB2.0 connection! (I guess you use the USB variant of this hardware…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(1,776 Views)

thankyou for reply.

okay sampling rate I can reduce to 10k.but what do you mean by no synch between 2 task?  I have set  same trigger signal for both daqmx task.so in this way they are synched I guess.if it is not then how to synch these 2 DAQmx tasks.

0 Kudos
Message 7 of 13
(1,772 Views)

Hi poojap,

 


@poojap wrote:

I have set  same trigger signal for both daqmx task.


As far as I can see you did NOT set the same trigger in both DAQ assistents…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(1,762 Views)

thankyou 

when you double click the Daq assistant you will find settings like trigger etc.there I kept trigger as PFI0 channel for both. I feel in this way we can synch them.is any other other way to do it?

0 Kudos
Message 9 of 13
(1,758 Views)

Hi poojap,

 


@poojap wrote:

when you double click the Daq assistant you will find settings like trigger etc.there I kept trigger as PFI0 channel for both.


When I open your VI only one of those two DAQAssistent is set to use the start trigger…

I repeat: there is no sync implemented!

 


@poojap wrote:

is any other other way to do it?


Yes - as is explained in the example VIs found in the example finder.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(1,754 Views)