LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating with the Linux OS on RoboRio

Highlighted

Ok So here is the issues. There is a hang issues witht he USB port on the roboRIO. This the the device that is used in FIRST robotics. It is using the Linux real time OS that is running in most of NI real time systems. I am a software developer for one of the 3rd party devices that is used. We have been working with NI for a while now to get all fo the bugs worked out tof the USB on the roboRIO. They told us that they would not be able to get to the problem of this hang issues before kick off Saturday Jan 7th 2017. They told us to go through the linux os because the VISA is where the hang problem resides.

 

They told me:

 

From Kevin O'Connor (FIRST)

"I just got around to testing this. It definitely seems to be an issue with VISA serial ports. I tried an OS level serial port directly, and it works fine. So it seems like the issue is in VISA, which we have no control over.

 

As Kevin was saying, this would be really risky to try and change to OS level serial ports less then 2 weeks before kickoff. We most likely wouldn't do this change at the WPILib level for this season, and I can't think of any other workaround other then switching to USB serial ports. Let me talk with Kevin to see what we should do about this."

 

"I talked about this briefly with the NI folks on the call this morning.

 

They suggested that it is likely possible to directly access the OS serial ports from LabVIEW by interacting with the /dev/whatever file descriptor and/or calling into libc.so for the c serial port functions.

 

I believe Thad’s suggestion to create an alternate WPILib API for C++\Java would preserve whatever he did for port discovery there, but he can confirm.

 

For LabVIEW, I believe you could dig into the Serial Port Open VI, open WPI_SerialPortGetPortName.VI and save off a copy into your library, then change the wire running from the VISA Resource indicator to run from the OS Resource indicator instead. You could then use this modified VI as part of your own Serial open which sets up the port by calling into libc.so instead of using VISA."

 

I have done this before when I had access to the DLL on my computer but I have not had succes with trying to get the information I need to configure the libc.so. I cannot find documentation and I am not skilled enough to do this my self. We would like to be able to get this working before Saturday.

 

I am using LabVIEW 2016 with realtime module

RoboRIO witht he latest Beta upgrade

Windows 7

 

I work for free so I am not making money on this. I am simply helping the FIRST community get better products to run thier robots.

 

Thanks in advance.

Tim
GHSP
0 Kudos
Message 1 of 2
(2,297 Views)
Highlighted

Hi Tim,

 

Accessing the OS serial port directly (bypassing VISA) would require an external library that would essentially reimplement a part of VISA.

 

I think the best approach here is to fix the behavior of VISA. I created a Corrective Action Request with that team describing the issue. I'll contact you when I hear back from them.

 

Thanks,

-Joe

Message 2 of 2
(2,263 Views)