LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO VISA Error -1073807192

Solved!
Go to solution

Hi Everyone,

 

My problem is as follows: my myRIO can successfully see a Hokuyo URG-04LX module that I've connected to the USB host port. However, when using VISA Open Resource, I receive the following error:

-1073807192: VISA:  (Hex 0xBFFF00A8) Access to the resource or remote machine is denied. This is due to lack of sufficient privileges for the current user or machine.

 

Online KBs suggest that this is a security issue to do with the IP address, but MAX shows that the myRIO's security settings allow communication on all ports.

 

So, at this point I'm stumped! Does anybody have any suggestions?

 

 

 

 

Further information:

 

The myRIO does not detect this kind of device by default, and I had to follow this tutorial to learn first how to get LabVIEW to recognise a connected ttyUSB device such as an FTDI chip, then deviate from the tutorial slightly so that it instead supports the USB Communication Device Class (ttyACM), which is the type of device class the URG-04LX adheres to.

 

The code I've used is as follows:

 

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

ttyACM[0-9]*     root:tty 666

 

Within /etc/rc5.d/, I've added the file S10SetLnUSB provided in the tutorial, except any entries pointing to ttyUSB have been changed to ttyASM:

 

#!/bin/sh
#echo "==>Creating SymLnk to ttyACM0"
#ln -s /dev/ttyACM0 /dev/ttyS2
n=`ls

/dev/ttyS* | sort | tail -1 | tr 'S' ' ' | awk '{print $2}'`
num=`expr $n + 1`
ln -s

/dev/ttyACM0 "/dev/ttyS${num}"

Finally, the tutorial recommends using this command to recognise the added script:
#chmod a+x /etc/rc5.d/S10SetLnUSB


At this point the myRIO can successfully see the connected device.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 1 of 20
(10,549 Views)

Hi all,

 

Just a small update.

 

I've managed to successfully increase the level of visibility of the URG-04LX module within MAX. Originally, it was being treated as a generic 'ASRL3::INSTR', but with some tweaking I've managed to acquire a full reference to the specific device instance. In fact, I've managed to grab two! Smiley Very Happy This is shown below.

 

URG Visible.png


At this point, I'm not able to directly acquire a reference within the VISA resource list within LabVIEW, however I can directly interface the device via a string constant:

 

labview hokuyo.png

 

 

I'm now going to reformat the myRIO so that I can start this process again from scratch, so I can deduce exactly what sequence of operations needs to be followed. I believe that the tutorial on this webpage may be what managed it! Specifically:

 

Create a file called 47-hokuyo.rules, and place this file within etc/rc5.d/. The contents of the file should be as follows:

 

SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{manufacturer}=="Hokuyo Data Flex for USB", ATTRS{product}=="URG-Series USB Driver", MODE="0666", SYMLINK+="sensors/hokuyo"

 

I then used the command #chmod a+x /etc/rc5.d/47-hokuyo to make the file executable.

 

This didn't seem to work immediately, however after following this KB, which recommends using the command #rmmod cdc-acm to stop Linux from blocking device access, it finally appeared. I'll double check this now.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 2 of 20
(10,506 Views)
Solution
Accepted by topic author Alex.T

I've reformatted the myRIO back to the standard driver implementation plus all extra NI-VISA (5.4) additional drivers such as the NI-VISA USB Passport. Turns out that after all this debugging, all you need to do to get a Communication Device Class (CDC, ttyACM) module to get recognised within LabVIEW RT is to perform the following:

 

  1. Get your LabVIEW RT remote target visible in MAX.
  2. Connect the USB module you wish to control to the USB host port of your remote target.
  3. SSH into LabVIEW RT.
  4. Double check that the device you're using is a CDC. You can do this by typing the command #dmesg,and getting a response that looks something like this:


    [  173.342694] usb 1-1: new full-speed USB device number 2 using xusbps-ehci
    [  173.635010] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
    [  173.652955] usbcore: registered new interface driver cdc_acm
    [  173.652977] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters


    Your actual response my vary slightly.

  5. Execute the command #rmmod cdc-acm. If the command prompt returns does not return with a response, the device driver has been successfully removed.
  6. Go into NI-MAX on your host machine and refresh the Devices and Interfaces list for your remote target. The hardware should now show up. Smiley Tongue

Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 3 of 20
(10,486 Views)

Very cool!  Thanks for posting.

0 Kudos
Message 4 of 20
(10,475 Views)

Hi Alex,

thanks for your great URG-04LX tutorial, but until now I was not able to see the URG in MAX.

log.PNG

I already did a rmod cdc-acm, but nothing changed.

 

dmesg shows

[    4.538340] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[    4.551390] usbcore: registered new interface driver cdc_acm
[    4.551410] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

 but the last line says 

[   68.448870] usbcore: deregistering interface driver cdc_acm

I'm wondering if it's ok.

I attached the full output of dmesg before and after rmod. I also added a file list of /dev/. The system is "out of the box", so there shouldn't be any wrong configurations done by me.

Have you an idea what could be wrong?

 

Thanks in advance

ArduinoMosfet

 

 

0 Kudos
Message 5 of 20
(10,319 Views)

Hi ArduinoMosfet,

 

That line looks familiar; in my experience when the device has already been registered outside of Linux, the deregistering interface driver line was thrown when it was already available for access... I think. 

 

Just to clarify, I completely formatted the myRIO and upgraded my version of NI VISA to the latest edition; I don't believe this was the version packaged with the myRIO. Once all of the software is installed (I was sure to include all drivers related to NI VISA), I was able to SSH into the device and execute #rmmod cdc-acm. A quick refresh in MAX allowed the LiDAR to become visible. No modifications to the /dev/ folder were required for this fix. 

 

Sorry for not getting back to you sooner.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 6 of 20
(10,224 Views)

Thanks for your help, but unfortunately it did not work.

 

First I taught the problem comes with Windows 8.1 (was not sure if it's supported).

So I installed Windows XP (old, but gold :D) on my machine. After installing the software and the RT-Linux-patch I installed all updates available (including the VISA one).

I tried the procedure with both firmwares: 1.0.0f1 (original) and 1.1.0f0 (newest).

After formatting the myRIO with MAX and rmmod the result was like before => MAX is not showing the USB-device

 

I have no idea what to try out now, maybe I'll try to use a completely different approach to estimate distances (maybe I try to work with a stereo camera).

 

Thanks for your effort Alex

0 Kudos
Message 7 of 20
(10,157 Views)

Hi,

 

I really think you should give the LiDAR another try. It's a very cool device and it'll provide you with the physical information directly, rather than having to infer it through computationally intensive vision processing...

 

I spoke to someone else having similar issues, if you check back on the document page, and this issue was resolved for him once he updated to the latest version of NI-VISA. What version are you currently running? Also, is the device powered via the serial port? It cannot be powered from the USB port alone.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Message 8 of 20
(10,046 Views)

Hi,

I've already seen your post on the document page. Thanks for the motivation 🙂

I'll tell you a bit more about the project, it's really cool: we (a group of austrian students) are trying to build an autonomous inspection robot for air ducts, which will drive on his own while taking photos and mapping the ducts. So using the LiDAR would save us a lot of work. Although the project is awsome, it's only a small lecture in which we have to build it.

 

The device is powered correctly (via the serial port). I tried with two URG-04LX and with a URG-04LX-UG01 (which is powered via USB only). So the LiDAR-hardware should work.

 

Then I finally managed to get the LiDAR work when it is directly connected to the PC (Windows XP). (I had to change the locale VISA-server-permissions (remote-access-list), maybe you could add this hint to your other documentation?)

 

My VISA-version is 5.4.1 (NIvisaic.exe is 5.4.0.49152), OS is Windows 8.1, myRIO-firmware is 1.1.0f0 and NI-RIO driver-version is 13.1.1.

# rmmod cdc-acm is done every time after a reboot of the myRIO.

 

I've installed all updates available (some are locked, but they are not VISA-updates).

 

Which VISA version are you using?

 

An other thing sounds strange to me. Do you know "VISA Interactive Control" (version 5.4.1). I'm not able to browse the myRIO. I'm getting error 0xBFFF00A7 (Network computer does not exist or does not allow connections. Check port and version (translated from German))

 

Thanks in advance for your help

Aaron

 

 

0 Kudos
Message 9 of 20
(10,034 Views)

Hi Alex,

 

Thanks you for your post.

I followed your instruction and now I can read the data from Lidar sensor on MyRIO .However, I can only achieve one fps (frame per second) of new reading data which looks very slow compare to what I expected (20 fps).Are you reading the same rate of new data on myRIO and Do you have any idea about the reason of such a slow fps?

 

Thank you very much in advance.

Roozbeh

0 Kudos
Message 10 of 20
(9,787 Views)