Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring CWPulse and CWCounter with DAQ device

I am using VB with Measurement studio components and a DAQ E6024 card. I have set up a counter which is triggered by hardware at gate PFI9 and which uses an internal clock as a source. I then set up a pulse which will be generated on the GPCTR0_OUT line out of the counter once it has finished. When I configure both counter and pulse in the code, I get an error saying that two many controls are configured for this device and that I need to reset one of the controls before configuring any other controls. So how do I make sure all the properties are set without configuring both components? Many thanks in advance.
0 Kudos
Message 1 of 2
(3,190 Views)
Greetings,

As this error indicates, a counter can not be configured for two operations at one time. So, you can assign the properties for CWCounter and CWPulse, call CWCounter.Configure, perform your counting operation, call CWCounter.Reset, and then call CWPulse.Configure. Since you want the counter to output a pulse when it finishes counting, you will need to reset CWCounter before you configure CWPulse.

Good luck with your application.

Spencer S.
0 Kudos
Message 2 of 2
(3,190 Views)