05-02-2016 08:32 AM
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
05-03-2016 06:46 AM
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
05-04-2016 03:06 AM
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.
05-06-2016 11:10 AM
Why do you need to restart your CAN device?
05-09-2016 05:06 AM
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
05-18-2016 01:27 AM
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?
05-18-2016 11:10 AM
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