LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-6255 Channel Configuration

The documentation for the PXI-6255 is  VERY unclear (to me) on configuration.  I found the attached sample VI and modified it to test my new card.  The VI runs to make the relay connections (without the ~), but when I add the "~" to disconect, the attached error results.  The error refers to "channels" and I can find NO documentation on how to set up "channels" for this card.  The documentation seems to freely switch syntac between channels and com1 for example?  What am I missing.
Download All
0 Kudos
Message 1 of 7
(3,726 Views)
Sorry, the board name is WRONG in the titile, the relay board is a PXI-2566.
0 Kudos
Message 2 of 7
(3,707 Views)

Hi Alyeska,

When you say that you modified the example so as to test your new card, I am unclear as to what you are trying to do. What functionality do you want to test? The example that you attached configures the device, makes all the connections on the scan list, waits for those connections to settle, and then disconnects all the connections listed on the scan list returning to the original position, and waits for that to settle.

Now to address your confusion about “channels” and “com”s. Your PXI-2566 switch module is “Single Pull Double Throw (SPDT).” This can be seen in the attached image from the excellent NI-SWITCH Help that installs on your computer with the drivers. While most switch modules have a large number of input channels that can be connected one at a time to one outgoing common or “com” pin, your module has 16 common outputs, each of which has only two inputs. The two input channels are labeled “NC” for normally closed (connected) and “NO” for normally open.

The cause of your error message could be two things. The message states that it does not understand the “~” symbol, since it looks for a channel name (for example: ch0 or com0 or nc0) following the specified device. In order to disconnect, the “~” has to come before the device name, so your scan list would look like “~/RelayDevice/no0->com0.”

However, even when the “~” is in the correct location, you still may have difficulties. This is because DAQmx’s Scan mode is by default “Break Before Make” which means that the hardware will break one connection before making another. The only time the “~” disconnect needs to be used is when “No Action” mode is engaged and connections are not broken unless explicitly told to do so. This example program first connects the channels on the scan list, so when it begins to run through the list and sees the “~” it will throw an error. If you look at the block diagram, the disconnect function follows the connect, so every connection that was made on the scan list is then disconnected for you and the relays will return to their default NC position.

I am unsure of how you want to test your new card, but there are a number of great example programs included in LabVIEW with the switch driver. These can be found by navigating to the Help Menu>> Find Examples>> expanding the Hardware Input and Output folder>>expanding the Modular Instruments folder>> and then looking in the NI-SWITCH file. When you click on an example VI, a brief description will appear in the Information box to the right of the Example Finder. You might want to look at Controlling an Individual Relay.vi, Making Connections on a Switch.vi, and Software Scanning.vi. The other examples are for using switch modules with Digital Multimeters and Thermocouples.

Also, when you find some documentation unclear, I find the NI-SWITCH Help to be very useful. It can be found by going Start>> Programs>> National Instruments>> NI-SWITCH>> Documentation>> NI Switches Help. Here you can see the pinouts for your specific device and find explanations of syntax, scanning, and triggering.

I hope this explanation helps, Mallori M.



Message Edited by mallorim on 01-16-2008 07:28 PM
Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
Message 3 of 7
(3,688 Views)
Mallorim,

Your thoughtful and detailed answer is of course most helpful.  The correct "~" location does work, I rechecked the documentation for Scan Lists, and it does show the "~" where I was putting it, not before a device name.  Maybe a note can be made of that to help someone else.

Working with the examples and some other help I have been able to move foreward.

Thank you for your assistance.
0 Kudos
Message 4 of 7
(3,676 Views)

Hi Alyeska,

I will go ahead and look into the documentation for the PXI-2566 and see about putting in a Corrective Action Request (CAR) so that this will be fixed for future releases of the product. Best of luck with your future applications.

Regards, Mallori

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 5 of 7
(3,667 Views)

Hi Alyeska,

I will go ahead and look into the documentation for the PXI-2566 and see about putting in a Corrective Action Request (CAR) so that this will be fixed for future releases of the product. Best of luck with your future applications.

Regards, Mallori

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 6 of 7
(3,667 Views)

Hi Alyeska,

So I looked into the issue with the documentation and I have figured out the problem. With NI-Switch, you can only program one device at a time. You have to have a separate session for each switch device. That is why there is no device name in the NI-Switch help documentation and the "~" comes right before the channel name.

However, the example program that you attached uses the DAQmx Switch functions. DAQmx allows you to use multiple switch modules, but you do not have as much controll as the NI-Switch drivers provide. Therefore, a device name is necessary before the channel name, and the "~" will need to come before that. If you look at the DAQmx Help file, under Syntax, you will see the "~" in the correct place.

Sorry for the mix up, Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 7 of 7
(3,648 Views)