LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Syncing DAQ: CAN and Analog

Hello,

 

I am working on a project where I have to synchronize DAQmx analog input and a CAN channel.

I found this information and examples like:

 

http://www.ni.com/tutorial/4204/en/

http://www.ni.com/example/29794/en/

 

These example are starting the DAQmx task, after the CAN and DAQmx task have been configured with the clock source and start trigger.

But in my case, the AI task is running ALWAYS while the application is running. At the same time, I need to start/stop the CAN communication synced to the DAQmx tasks. That means, I can't start/stop them together.

 

I know, that I can use the timestamp of the CAN messages and the t0 element of the analog waveform output.

 

As far as I understand, I can use the same timebase/clock source. But because I can't start DAQmx and CAN together - what does that mean to the synchronization of the absolute timestamps?

 

Thanks!

Regards,

Florian

0 Kudos
Message 1 of 7
(4,223 Views)

Hi Florian,

 

I have found some LV-Examples which should be helpful.

This is the path for a Windowsregister:

C:\Program Files (x86)\National Instruments\LabVIEW 2015\examples\nixnet\examples.llb

 

Otherwise You look up LabVIEW-Examples -> search Hardware -> pick Topic -> Folder "signalaquisition and output via hw -> CAN -> NI-XNET -> sync.

 

Best Regards

Pascal

0 Kudos
Message 2 of 7
(4,198 Views)

Hi,

 

thanks for your support.

But also there I only can find examples where AI and CAN Tasks are started together, using the start trigger.

 

Do you mean a specific example which I did not find? The exact name would be useful.

0 Kudos
Message 3 of 7
(4,176 Views)

Why do you need to restart your CAN device? 

0 Kudos
Message 4 of 7
(4,147 Views)

Hi Florian,

 

I copy-paste the path I've told You. I now see why You ask for a specific one, because there are "hundreds" of examples popping up.

I now picked the specific one's I thought about called

 

"Synchronize C Series CAN with DAQmx Analog Input.vi"

or

"Synchronize DAQmx Analog Input with C Series CAN.vi"

 

Regards

Pascal

0 Kudos
Message 5 of 7
(4,113 Views)

The software is testing parts. On each new part, the CAN is started again.

I am not sure if it would be possible to leave it running all the time without getting errors, when even no device is connected?

0 Kudos
Message 6 of 7
(4,050 Views)

Hi Florian,

 

as I understand, You're using LabVIEW.

There it should be possible for the errorhandling not to stop the VI, if you programatically change it the way You want. Maybe its also necessary to change the timeout-condition. Otherwise I can not follow what the issue is. In that case You could provide the Softwareversion and exact Harware-Setup You are using.

 

Regards

Pascal

0 Kudos
Message 7 of 7
(4,040 Views)