Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use instrument library on myrio RT target

I've been using some RT code to run an FPGA program on a myrio-1900.  Now I wanted to add a step to calibrate the laser power before I do all the stuff I was already doing in the code.  I need to use the instrument library for my power meter, which works fine in Labview on my computer in the instr.lib folder.  However, I don't know how to add the library to the myrio RT target.  When I try to drag and drop it, that doesn't work, it won't add it to the project.  I did manage to map the myrio to one of my network drives so I could put the library into the c/ folder on the myrio, but I still get the error "Failed to load shared library...  Ensure that the library is present on the RT target.  Use either MAX to install NI software or FTP to transfer custom libraries to the RT target."

 

Is there a particular folder on the myrio where I'm supposed to put the library files for it to find them automatically?  Or is there some other way to tell myrio where to look for files so it can use them?  

 

Thank you so much for any help you can give me.

0 Kudos
Message 1 of 4
(1,643 Views)

Although I've not used the Instrument Library, I believe that this is intended to be run (only) on a PC running LabVIEW, and not on an NI product (such as a myRIO) running LabVIEW Real-Time Linux.

 

What instrument are you hoping to use on the myRIO?  Does it have a Driver that is installed in the Host's Instrument I/O Palette?  Does the Manufacturer say anything about using the Instrument with a Compact RIO?  [I'm guessing they do not].

 

Please help us to help you by providing more specific information than "I need to use the instrument library for my power meter" -- which Instrument Library, for what Power Meter?  If we know the name of the software, we might be able to locate it and see if it is intended for the Host (PC) or RT Target (myRIO).

 

Bob Schor

 

 

0 Kudos
Message 2 of 4
(1,519 Views)

Sorry, I should have deleted this.  I realized after I wrote it that what I was trying to do was hopeless anyways, as I don't think it will be possible to get the drivers to work on the myRio.  I ended up just having to manually enter the power values from the power meter, as it was going to be way too annoying to have it read directly from the power meter.  Thanks anyways, sorry about that.

0 Kudos
Message 3 of 4
(1,491 Views)

@StephM wrote:

Sorry, I should have deleted this.  I realized after I wrote it that what I was trying to do was hopeless anyways, as I don't think it will be possible to get the drivers to work on the myRio.  I ended up just having to manually enter the power values from the power meter, as it was going to be way too annoying to have it read directly from the power meter.  Thanks anyways, sorry about that.


Sorry, I didn't notice you "gave up".  How have you structured the interaction between Host and Target routines?  In most of my LabVIEW RT Projects, I have a State Machine running on both Host and Target, and a pair of Network Streams that can send "Next State" messages (with the Message being a Cluster of State and optional Data, passed as a Variant) from Host to Target and Target to Host.  So when you need to know the Power Value, Target sends Host a message "Send Power to Target", and when Host's "Message Listener" gets this message, it sends it to the Host State Machine's "Send Power to Target" State, which reads the Power Meter and fires off a Message "Power from Host" to the Target.  The Target "Listener" generates a "Power from Host" Message and that becomes the next State of the Target State Machine.

 

Since LabVIEW 2016, I've been doing 95% of my Asynchronous Data Transfers using Asynchronous Channel Wires, particularly using the Messenger Channels for State Machines, similar to the Queued Message Handler model (I call it the Channel Message Handler).  A few years ago, I started using the CMH with the myRIO, but the Messenger Channel Wire has some peculiarities that didn't quite work right until LabVIEW 2019 (they were fine in the Host, but seemed "flaky" in the Target).  I think, though, that they are working pretty well now (Famous Last Words ...).

 

Bob Schor

0 Kudos
Message 4 of 4
(1,333 Views)