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.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Return the DigIO line used by counter

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

0 Kudos
Message 1 of 3
(2,512 Views)

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

0 Kudos
Message 2 of 3
(2,460 Views)

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

 

0 Kudos
Message 3 of 3
(2,440 Views)