Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Inverted Outputs using DAQMX

We have been using traditional daq with an SCXI 1163.  We have an interface that uses an inverted digital output on odd channels.  Using traditonal DAQ we could set any of the bits to be inverted in the properties.  Using DAQMX it looks like you can only set them to all inverted or not and not able to set individual bits.

0 Kudos
Message 1 of 13
(7,699 Views)

Hello,

 

I'd be interested to see how you're inverting specific channels for DO in Traditional DAQ. If you'd like to elaborate on how you're doing this with a screenshot or explanation, I'd try to find an analog for DAQmx.

Alternatively, you could invert the logic going to the odd channels in software. 

 

Quick question:

Are you trying to invert the logic on all odd lines of a port, or just on every other bit in the stream sent to a particular line?

0 Kudos
Message 2 of 13
(7,655 Views)

Sorry for the late response was on vacation and then at NI Week.

 

We have custom cards in our test systems that have logic driven by the SCXI 1163.  In the test mode we select two bits one inverted and the other non inverted (ie channel 0 and 1).  This allows us to read voltages and currents from our test systems by using the the test parameters of an SCXI 1102 in test mode using MAX.  The following screen shot is from the Traditional DAQ properties which allows you to set the bits to invert.  In DAQmx there is only one selection that allows you to invert all but not on an individual basis.  This prevents us from converting to DAQmx.  Hope this all makes sense.

 

1163 Properties.JPG

0 Kudos
Message 3 of 13
(7,573 Views)

Yes, that makes perfect sense now. I have simulated the system with DAQmx and Traditional DAQ and I see what you're talking about. I currently see no way to configure "Signal Inversion" in a Digital Write DAQmx task, only a Traditional DAQ task. This functionality may have been removed to remain more consistent between code and task. For instance, if someone accidentally changed inversion on one line, it could be difficult to troubleshoot. The DAQmx task may be preventing such errors by removing that functionality. This is just a guess.

 

To work around the issue, is there a way you could programmatically switch the signal inversion in your code? How do you write to the lines? Are you using something like the Digital - Continuous Output.vi?

https://decibel.ni.com/content/docs/DOC-25286

0 Kudos
Message 4 of 13
(7,563 Views)

Unfortunately we have 40 customs cards we write the digital signal and the logic requires the inversion of each odd channel.....too bad this functionality was not carried forward to the DAQmx.

0 Kudos
Message 5 of 13
(7,544 Views)

This might help:
 Capture.PNG

Message 6 of 13
(7,529 Views)

Thanks for proviiding a software solution it would be nice if this was also included in the properties under MAX...thanks so much for your interest and help.

 

0 Kudos
Message 7 of 13
(7,527 Views)

If I use the software solution,  will the properties for the 1163 stay that way?  What I mean is that in the traditonal daq I can change the inverted lines in MAX and they will stay that way.  This was great as I could then use MAX to run the digital signals and then use the 1102 to read the voltage from my test fixture.  So if I use your software to invert the lines ie make a small program to invert the lines I need, will those lines stay inverted after the program runs?  Once again I wish the same properties that were present in traditional daq had been carried forward to DAQmx.

0 Kudos
Message 8 of 13
(7,420 Views)

This would only apply for the specific task that the property node is connected to. Once the task is stopped, the logic would return to default for a subsequent program that does not have the same settings. 

0 Kudos
Message 9 of 13
(7,395 Views)

I have used your example to change the invert lines and am having trouble reading the status of the inverted lines.  I changed the propety node from write to read but i don't see the correct info. Can you give me an example. Thanks,

0 Kudos
Message 10 of 13
(6,649 Views)