Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

changing counter output

Here is the information:

We are using counter 0 to drive an air pump but the output is wired to PFI0 instead of the default PFII12. The hardware engineers prefer not to rewire this at this point.

For the air pump, we are driving the counter at 20khz at anywhere between o and 100% duty cycle to control the speed.

The idle state of the counter output can be either 0v or 5v depending on which pump a system is using.

We are using P2.4 (which is also PFI0) as a general purpose digital output to drive a system light.

The current state of P2.4 can be either 0v or 5v at any given time depending on whether the light is driven high or not.

When turn the pump on/off the light is also being turned on/off which is not good. As I mentioned in a previous post, by changing the ctr0 export line it is no longer driving PFI12 while the counter task is active, but as soon as I stop the task (turn off the pump) it drives PFI12 again to set the idle state.

No the program is not done running when we turn the pump off. The air pump will be turned on/off possibly 100s of times during the program execution and even the "protocol" is complete the system is still running. This is a medical device that is always on.

0 Kudos
Message 11 of 12
(315 Views)

Awesome, thanks for the summary! Follow up questions--

 

How is P2.4 being routed and written? Is the task that controls the light stopped and cleared after each write? To get the full disconnection, let's try setting the CO.Pulse.Term (or DAQmxSetCOPulseTerm) to an empty string. For the couple of forum posts we had looked at, it seems like that was able to create the disconnection that they needed.

Claire M.
Technical Support
National Instruments
Certified LabVIEW Developer
0 Kudos
Message 12 of 12
(311 Views)