04-03-2017 12:18 PM
Hi
Is there a way to return the Digital IO line than a counter uses? in daqmx api, using vb.net
using the usb 6002, the counter by default uses PFI 0 which is also Port2/line0, but I am looking for a way to programatically return Port2/line0. Or whatever the counter of a device is linked to?
Regards
Chris
04-07-2017 05:26 AM - edited 04-07-2017 05:26 AM
Hi Chris,
The counter on the USB-6002 is an event counter so it cannot be used to generate a signal. It can only be used for edge counting and not pulse train generation itself.
However, if you want to use the lines specified for PFI1 and PFI0 (the counter lines) to output a digital signal, then you can use P1.1 and P2.0 to output a digital signal. I have not used .NET programming myself, but these are the supported USB-6002 properties using the DAQmx API:
http://zone.ni.com/reference/en-XX/help/370471AC-01/cdaqmxsupp/usb-6002/
Best Regards,
Jeneni
04-12-2017 02:08 PM
What I am trying to achieve is to create a script that looks at the available connections and automatically works with them. Irrelevant of NI device used.
Using "DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.CI, PhysicalChannelAccess.All)"
I can see that I have 1 counter ctr0
Using "DaqSystem.Local.GetTerminals(TerminalTypes.Basic)"
I can see there are 2 PFI connections PFI0 and PFI1
Using "DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.DILine, PhysicalChannelAccess.All)"
I can see I have 13 different available lines
I know that PFI0 uses the same connection as P0.line0, but I cannot find a function call that tells me that PFI0 uses the same connection as P0.line0.
Also I cannot find a function call that tells me that cnt0 uses PFI0,
Regards
Chris