LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RIO devices

Solved!
Go to solution

Hi All

 

Does anyone know of a way to display the currently installed RIO devices in labview? I have a system which will be using 1 or 2 FlexRio devices and I will need to get this information into labview so the code can adapt.

Currently I can see the device in MAX under the RIO section but not sure of a way to get this info into labview.

 

Any help would be much appreciated

 

James

0 Kudos
Message 1 of 6
(4,176 Views)

Hi James,

 

Thank you for contacting National Instruments. I have managed to come up with 2 different suggestions which should at least get us started towards a solution.

 

1. If you are accessing a Compact RIO, I would recommend using the RT Get Target Information.vi which comes as part of the Real Time module. This would be very easy to correctly identify the cRIO or other Real time device that you wished to use. 

 

2. In your situation, there isn't a nice quick way of doing this but I do have a suggestion. I've created a snippet below which will return the name of each of the items within your project. You could then do a quick comparision between different items and then select the item that corresponds to the device that you wish to target. 

 

You would need to add the objects to a project so I am not sure how useful it would be towards your end goal.  One method you could try would be to build two projects which you could then select either one or two flexRIOs. The property nodes would then be able to identify either or both of the FlexRIOs

 

ExampleOfRIO.png

 

Let me know your thoughts.

 

Many thanks

Andrew McLennan
Applications Engineer
National Instruments
Message 2 of 6
(4,141 Views)

Thanks for getting back to me

 

Solution 2 will work fine for most applications but not for my.

Its my fault for not explaining the problem fully. The reference from the two different FlexRIO's will passed into executables i.e. No projects involved. Both executables will be running in parallel but on separate FlexRIO devices. The end user will have MAX and the full LabVIEW Debug environment installed. were hoping to make it so that the user can unplug one of the FlexRIO's and still run the software. This is the real reason why were need to know how many RIO Devices are installed and what they are.

A though that has crossed my mind is that the "RIO Device" control has some information with regards to installed devices, and surely if that has a hook into MAX then there must be a way

 

Best Regards

 

James Hall

0 Kudos
Message 3 of 6
(4,133 Views)
Solution
Accepted by James Hall

Hi James,

 

It is possible to detect NI FlexRIO devices using NI-VISA.  I took this knowledgebase and tweaked it a little bit to generate a list of all of the RIO devices on my machine:

 

FindRIODevices.png

 

 Thereare probably a few other NI-VISA properties you can use, but the Interface Description property will return resource name, model number, slot number, and the serial number.  

Regards,
Browning G
FlexRIO R&D
Message 4 of 6
(4,109 Views)

Thank you Browning thats a cracking solution, worked first time no worries.

Also thank you Andrew for your help

0 Kudos
Message 5 of 6
(4,099 Views)

We've got a similar requirement but later on in the process. We want the same code to run on whichever FlexRIO target happens to be in the system.

 

We've generated some FPGA code that runs on a FlexRIO device (though this is also applicable to standard RIO devices) and all of this is working with the HOST. We've also compiled the same FPGA code for different FlexRIO devices, to handle the case(s) where the end user could be using a different board. Different FPGAs have different TypeDefs even if it they have the same panel. The Knowledgbase article on "Using the Upcast Function for LabVIEW FPGA Host Interface" states that "..the FPGA VIs must run on the same FPGA target type" so it doesn't look as this can be done.

 

We have managed to get it to work by using separate FPGA references and then duplicating the code in CASE statements - the CASE control determining which of the FPGA References to use based on what was found at the program start. This is extremely unwieldy as all potential target references have to be passed to all parts of the HOST that access the FPGA, and an appropriate CASE condition added for each! I've attached a snippet of the HOST code that illustrates this scheme.

 

Is there an alternative way for the same HOST code to switch between the different FPGA VI references?

 

Dave

0 Kudos
Message 6 of 6
(3,946 Views)