Page 1 of 2

LINX for NI myRIO-1900

PostPosted: Sat Feb 22, 2014 10:18 am
by tatN
I am trying to use the LINX API for NI myRIO-1900, but no luck so far.
Can anyone advise me on how I should set up correctly?

Here is my status:
- In the LINX myRIO support window, "Enable myRIO Support" button has grayed out.
- If I set the parameters for as follows, Platform=myRIO, Interface=TCP, TCP Configuration= an IP Address), 20(as Port)
then I get an error. The error code=-363000 and The NI myRIO is unknown.
- If I change the parameters of Platform to LINX, then the returns myRIO-1900 as Device Name,
but I still got error of code 5003 on TCP
- myRIO is connected via USB cable
- LINX worked with Arduino UNO
- myRIO has worked as an RT target device when I use NI RIO driver (without LINX)
- I am using Windows 7 64bit and LabVIEW 2013 32bit
- LabVIEW Real-Time module and LabVIEW for myRIO module are installed

Thanks in advace.

Re: LINX for NI myRIO-1900

PostPosted: Sat Feb 22, 2014 4:08 pm
by samkristoff
Hey tatN,

When you're using myRIO you don't need to upload any firmware to the myRIO, so don't worry about running the firmware wizard.

By default myRIO support is disable. To enable myRIO support open LabVIEW and click Tools»LabVIEW Hacker»LINX»myRIO Support

If you want to use the myRIO's IO just place the LINX Init vi and don't connect any inputs to it. The VI can tell when it is running on a myRIO and will configure itself accordingly. The only time you need to wire inputs to the Init VI on myRIO is if you want LINX code running on the myRIO to control another LINX device such as a chipKIT.

The great thing about LINX with myRIO is that you can deploy code written using LINX and have it run headlessly on the myRIO (without a connection to your desktop like other devices require).

Let me know if that all makes sense or if you have more questions.


Re: LINX for NI myRIO-1900

PostPosted: Sat Feb 22, 2014 8:18 pm
by tatN
Hi Sam K,

Thanks for the prompt response.
I have disconnected all the inputs to the, and I still got an error unfortunatelly. The error code is 54 and the source (messages) is as follows:

"Open TCP communication"/LVH-LINX.lvlib:Device.lvlib:TCP>LVH-LINX.lvlib:Device.lvlib:Initialize>>
(The first statement of "Open TCP communication" is manually translated by myself since my version of LabVIEW is Japanese.)

To confirm my myRIO is enabled, I have manually disabled the "myRIO Support" and tried to "Enable" again. Then, I found the "Enable myRIO Support" button was still grayed out. I run the same test VI and am still getting the same error.

Any input would be appreciated.

Re: LINX for NI myRIO-1900

PostPosted: Sun Feb 23, 2014 9:21 am
by samkristoff
Hey tatN,

It sounds like the Init VI is not detecting that it should run on the myRIO.

Do you have the main VI in a LabVIEW Project under a myRIO target like you would for any other VI running on the myRIO?


Re: LINX for NI myRIO-1900

PostPosted: Sun Feb 23, 2014 11:14 am
by tatN
Hello Sam K,

Thanks again for the response.

I have created a LabVIEW project and added the main VI under a myRIO target. I do not see the error anymore. Thanks for your kind advise!
(I expected a myRIO to be treated as a serial device just like an Arduino, so I did not use a LabVIEW project.)

Now, I am testing a digital write (DO), how do you specify a channel?
NI-RIO API has "Channel Names" input terminal in located at myRIO >> Advanced I/O >> Digital input/output, and it gives me something like A/DIO0.
I need to know how I can specify it in LINX's Digital for example.

The idea of platform independent LINX code is excellent, and I would like to use several different hardware target for an educational purpose.
Lastly, if there is an introductory document somewhere in LabVIEW Hacker homepage, please let me know.


Re: LINX for NI myRIO-1900

PostPosted: Sun Feb 23, 2014 11:30 am
by samkristoff
Hey tatN,

Just use the LINX vis for things like digital IO, analog input, SPI, etc. The LINX channel numbers map to myRIO pins such that myRIO A/DIO0 is LINX DIO channel 0, myRIO A/DIO15 is LINX DIO channel 15, myRIO B/DIO0 is LINX DIO16, etc.

There is a little info on it here: ... s:channels but it could certainly be expanded on.

The LabVIEW hacker website is a wiki so feel free to add to it. I'm also trying to add to it as I answer questions here to make sure all of the basic information is out there.


Re: LINX for NI myRIO-1900

PostPosted: Sun Feb 23, 2014 7:42 pm
by tatN
Hi Sam K,

I have tried to light an LED on channel 0 (or A/DIO0). It does not give me an error, but the LED does not renpond.
(Actually, I have scanned all the 40 DO lines, but none of them are worked. I have also checked an analog input (AI0), and I got 0V with no noise...)


I have confirmed that the channel A/DIO0 works properly using NI RIO API (without LINX VIs).
Any recommendation?

Re: LINX for NI myRIO-1900

PostPosted: Mon Feb 24, 2014 11:14 am
by samkristoff
Hey tatN,

I just tried this and at first saw the same thing you did, then I realized that I didn't enable LINX myRIO support. I ran the wizard (Tools>LabVIEW Hacker>>LINX>>myRIO Support...) and I had to run the disable support, then close the wizard, reopen it and run the enable support. Once I did that everything worked fine. I'll file a bug report on the wizard since it works...but not quite like it should.

You can check if myRIO support is properly enabled by digging into the LINX Digital Write VI as follows:

Digitla Write>>Digital Write N Channels then look at the myRIO case of the case structure. The diagram disable structure should be enabled if myRIO support is properly enabled (like the image below)

0.PNG (11.75 KiB) Viewed 10438 times

Let me know if that works. Also thanks for bearing with me and reporting these issues. I really appreciate the feedback.

Re: LINX for NI myRIO-1900

PostPosted: Mon Feb 24, 2014 7:02 pm
by tatN
Hi Sam K,

It is now working! Thanks for your advise.
I would like to comment one thing since there was one tricky part.

After disabling the myRIO support and closing a project, I reopened the LINX myRIO Support Window:
Tools»LabVIEW Hacker»LINX»myRIO Support.

I can see the Enable myRIO Support button is now active (i.e. not grayed out).
However, it lasted only for 2 seconds, then the button turned back to an inactive "grayed out" mode.

I opened the LINX myRIO Support window again, tried to click while the enable button was active, and it worked.
As you mentioned, the myRIO case in the case structure of the Digital Write N Channels.VI is now in Enable mode.

I would very much appreciate your help.
I am definitly using LINX for my project.

For some reason, I could not upload an image last time, so I have used a link to a temporal location.

Re: LINX for NI myRIO-1900

PostPosted: Mon Feb 24, 2014 7:22 pm
by samkristoff
Glad to hear you got it working. As you mentioned it seems the wizard needs a little work.

Now that we got that sorted out, what are you working on? I'm always interested to see how people are using the LabVIEW Hacker Toolkits.