08-29-2011 08:09 PM
Hi,
I have a cDAQ-9178, which has two PFI ports mounted on its chassis.
I need to send out a sync pulse for a high speed camera and want to know it it is possible to use one of these PFI's to accomplish this.
I've tried a number of different things but can't get anything to work.
Thanks in advance for the help.
Regards,
Michael
08-30-2011 04:01 PM
Hello M. Brincat,
Thank you for bringing this issue to the forums. Yes you can. You have to use the "DAQmx Connect Terminals.vi" and make your destination terminal PFI0 and make your source terminal whatever line you want to export. Well I hope this helps, I got this to work on my end connecting my PFI0 line of my cDAQ 9178 chassis to cDAQ 20MHz timebase.
Thank you,
Vimal Fernandez
08-31-2011 08:29 AM
Hi Michael-
A couple of quick tips in addition to Vimal's advice:
The chassis PFI terminals are only recommended for use up to about 1MHz. So, the NI-DAQmx driver will allow you to route most signals on the chassis, but I would not advise trying to export high frequency timebases or the like because the hardware characteristics will not make for a very clean signal in that case.
Also, in addition to DAQmx Connect Terminals you can also use LabVIEW Property Nodes (or various C functions for accessing properties) to select output and input terminals for most digital signals associated with your tasks. Check the DAQmx Channel Property Node for the channel type you are using to find available routing options. Using the Property Node method has some advantages because those routes are established within the scope of a task, so when the task is cleaned up they are guaranteed to be cleaned up as well.
This is not to say that DAQmx Connect Terminals won't work, because it will. But, you should be careful to remember to make corresponding DAQmx Disconnect Terminals calls once you are done with the routes because they will not otherwise be automatically cleaned up unless you issue a Device Reset.
Hopefully this helps-
09-02-2011 01:01 AM
Thank you both for your replies.
I have tried out the DAQmx Connect Terminals, connecting my sampleclock to PFI0. This looks to be a step in the right direction as I get an output from PFI0, at the desired frequency. (I'm only interested in frequencies of up to 10000Hz, as our highspeed camera cannot capture anything greater.)
The only problem I now have is the signal generated by the sampleclock only has a very small duty cycle. (on my CRO it looks to be 1% or so). I require something like a 50% duty cycle, for the camera to be able to sync to. Is this possible?
I've looked at the DAQmx Channel Property Node, but as I am quite new to Labview I can't seam to get it to work.
Any more pointers would be a great help.
Regards,
Michael
09-02-2011 12:37 PM - edited 09-02-2011 12:38 PM
You should use a counter to generate a pulse train. You can manipulate the duty cycle as needed. If you don't have a digital module in your chassis, use the internal counter channels, _ctrX. You should be able to set the output terminal to be the chassis PFI line.
You can also use this signal as your sample clock for other tasks. Just set the sample clock source to be CtrXInternalOutput
09-22-2011 05:07 PM
I've got all the camera syncing to work.
There is one last thing I need to do. Is is possible to configure the other PFI (trig 1) to produce a logic value. for example if there is 0V on the input it would be false and if there were 5V on it, it would be true.
I've tried to set the PFI up as a digital input, with no luck.
I would also be happy if I could just count edges and on the PFI and when the count is greater the 0 it would be true, trigger my loop and once completed reset the count to 0.
Any help would be appreciated.
Regards,
Michael