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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Complex I/O help needed

I have a cDaq9133 chassis that is the backbone of a test unit.  The device under test (DUT) takes in a few signals from a NI-9477 digital output card.  The card says it can be configured as open drain (but it errors every time I try).  The DUT outputs 4 PWM channels per connector and has 4 connectors.  Each PWM represents a color, Red, Green, Blue, and White.  The DUT has a color input (again open drain pulled to ground) to index throught the colors.  The chassis has a 9477 digital output, 9221 analog input, and 2 9361 counter input cards.  I first tried using DAQ assistant blocks, but was told not to do that by NI tech support due to the number of virtual channels I was creating.  I re-wrote the project using DAQmx blocks, however, now that they are on the outside of the case structure, I have the following issue:  In the "index to red" (and blue, grey, green), case, I had a for loop setup to toggle the color pin.  In the first method (rev 1), it appeared to work (simulation only due to other card issues to be stated below) as the pin would toggle on and off as needed and then index to the next case.  Now, with the second method (rev 2), all of the I/O are written/read outside the case statement but inside the while.  Given that arrangement, I can't have a for loop inside a case statement, because the I/O won't be written to until I exit the case. 

  Question:  How do I toggle the color pin a various amount of times?  Also, further in the VI, I need to produce a 270Hz and 400Hz signal on the dimmer inputs.  As you can see in Rev 1, it somewhat works, however in Rev 2 I didn't even bother to try to rewrite it.  Thanks in advance for your help.

 

Note, I could only attach 3 files, so global 1.vi , used by rev1, is not included, but global 2.vi should work as it has all of global 1.vi's signals.  I still haven't figured out how to change all global1 varaibles to use global 2 file.

 

 

Other hardware issues.  I've been through 4 tech support persons trying to get the internal 5V pull-up resistors enabled on the 9361. Rev 2 should fix it, but I have 0v on my pins while the VI is running.  Also, the 9477 manual says it can handle open drain outputs, Tech support and I created the channel node to enable this, but it errors every time.

 

Download All
0 Kudos
Message 1 of 6
(2,926 Views)

This is not the "help" you requested, but to attach "lots of stuff", put everything in a folder, compress the folder, and attach the single .zip file.

 

Bob Schor

0 Kudos
Message 2 of 6
(2,899 Views)

The question about the pull-up resistors might be configurable with MAX or with a Property Node.  I don't know this particular Counter, but other NI products I've used have configuration options (on a per-channel basis) for such things as Pull-up/Pull-down settings.  If you can Set it in MAX, you can (usually? always?) also set it with a Properfy or Invoke node.

 

Bob Schor

0 Kudos
Message 3 of 6
(2,886 Views)

in Rev 2, I've used the property nodes.  I had to first select "show all" to find the output state.  Once executed, the pull up option seems to run but measuring the physical pin shows 0v.  On the digital output, the data sheet says open drain is possible, but again, I had to show all to even find the right property.  When executed, it errors out saying this is an invalid setting.

0 Kudos
Message 4 of 6
(2,874 Views)

attached is the state control vi necessary to see all the states. and global1 used  in rev 1

 

Download All
0 Kudos
Message 5 of 6
(2,846 Views)

Hello Joe,

 

So just to clear up a one thing: The 9477 module is a sinking digital output module. You do not need to configure it to be so.

This is likely the reason for the error you are seeing, and why you had to dig so much to find the settting.

 

Also it sounds like you are trying to connect two sinking sources together. In order to do this you'll need to add a pull up resistor or an external power source (See page 8 of the 9477 user manual)

http://www.ni.com/pdf/manuals/374182c.pdf >

 

Check out these resources as well for more information:

Configuring the outputs of the 9477:

http://forums.ni.com/t5/Real-Time-Measurement-and/How-to-configure-the-outputs-voltage-of-NI-9477/m-... >

 

Connecting two sinking devices together:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/bf4b2f3568cb0d7086256b8e006ee07c?O... >

 

Also as a pro tip: Try and break posts down into individual questions. I think you'll find that it's easier for others to assist you when you do.

 

-ChristophersonJ

0 Kudos
Message 6 of 6
(2,768 Views)