Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB to Serial Not Working through VISA on cRIO-9068

Let me start out by explaining what exactly I'm trying to do.  I have a cRIO-9068 that I would like to use the USB port on to connect to an RF module (radio) which is capable of communicating through USB.  I've already gotten it working in LabView by using the USB port on my PC running Windows 7.  In Labview, I'm using the VISA commands (Configure, Read, Write, Open, Close).

 

When I connect the radio to the USB on the cRIO, I can see that MAX detects the device because it adds the interface (ASRL4::INSTR) with the port binding "/dev/ttyUSB0".  In LabView, if I do something as simple as use the VISA command to configure the serial port I get an error code "-1073807192" as shown in the attached screenshot.

 

In my investigation to resolve this issue, I was able to SSH into the LinuxRT OS and verify that the USB module was being recognized when the radio is plugged in, and even went so far as to communicate through the "/dev/ttyUSB0" port to my radio successfully.  It seems as though it is an issue with VISA, but I can't figure out how to fix it.  I tried reinstalling VISA, with no success.  It seems to me that the interface Status "Not Present" reported in MAX (see screenshot), might be a clue, but I can't figure out what to do from here.

 

Thanks in advance!

Wayne

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

I believe I found a solution for this.  After doing some more digging in the forums I found a similar issue described here.  In both cases, the USB peripheral device was detected in MAX, but resulted in an error when trying to use VISA commands.  I started going through the steps and found that my system worked after simply doing the following:

 

1)  SSH into the target (cRIO-9068).

 

2)  Within the /etc/mdev.conf file, underneath #typical devices, I've added the line:

ttyUSB[0-9]*     root:tty 666

 

3)  Restart the target.

 

Upong re-discovering the devices and interfaces, the "Status" of the USB Port (ASRL4::INSTR in the attached screenshot) was now "Present" rather than "Not Present".  Running several VISA commands (Configure, Open, Read, Write) now works without error.  As an additional test I added a second radio (Shown as ASRL4::INSTR) using a hub and that one was discovered and the VISA commands worked without error.

0 Kudos
Message 2 of 4
(4,697 Views)

I don't have that file /etc/mdev.conf.

 

Is it possibly in a different location on the 9067?

 

 

Thanks.

0 Kudos
Message 3 of 4
(3,936 Views)

See the post on the community problems forum:

https://decibel.ni.com/content/message/101225#101225

 

 

For this to work you need to add a file "/etc/udev/rules.d/ttyUSB.rules" with following contents:

 

KERNEL=="ttyACM[0-9]*", GROUP="tty", MODE="666"

Message 4 of 4
(3,601 Views)