SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Toggle one channel of NI9485 in succesive steps

I am using the NI9485 and CDAQ9172 to perform a battery capacity test.  I am trying to use one channel of the 9485 to turn on a load, then turn it off at the end of the test.

 

I begin by adding a step to generate a digital line output on channel 0 of the NI9485.  I tell it to switch high, one sample on demand.

 

Then I add the next step, generate digital line output on channel 0 again, tell it to switch low, one sample on demand.

 

When I run it, the second step gets an error that says something like 'resource already in use', and nothing happens.  So it can't switch channel 0 back to zero because it thinks it's already in use in the previous step.

 

How do I toggle the relay output on then off in successive steps in the same project? 

0 Kudos
Message 1 of 2
(6,263 Views)

Hi grayscale,

There are a few ways to toggle a digital line in SignalExpress. The first is similar to what you are trying to do. You can use two DAQmx Generate steps in sequence to set the value high and then low. Between these two steps you will have to add a Sequence step with the property "Allow hardware reuse" enabled. This will allow you to toggle a line.

Another way to toggle a digital line is to use one DAQmx Generate step inside of a Sweep step as shown below. Make sure the value to change is set to "Value to write" and the start value is 0 and the end value is 1. This will also cause the line to toggle.

 

 

 

Regards,
Kent
National Instruments
Applications Engineering

Message Edited by tnek on 01-16-2009 12:13 PM
0 Kudos
Message 2 of 2
(6,253 Views)