From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa is only able to show my parallel port when run with sudo

Solved!
Go to solution

Hello,

I am trying to talk to a monochrometer through a parallel port serial connection. I have Labview 2018 installed on Centos 7 along with nivisa. When I run "sudo NIvisaic" I can see the serial port but without sudo I can not (it shows as unknown). When using the port in lab view I get the error

"Error -1073807192 occurred at VISA Write in Parallel Exp.vi


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" 

 

running "sudo Labview64" shows command not available. How do I run labview with escalated permissions to see this port or is there something I am missing?

0 Kudos
Message 1 of 7
(2,613 Views)

It's been a really long time since I used Linux, but can you go to the /dev/ directory and find the port you need to use (lp0 if it's really a parallel port, ttyS0 if it's serial, maybe something else newer...) and change the permissions there using sudo just once?

0 Kudos
Message 2 of 7
(2,598 Views)

Changing the permissions with "sudo chmod 666 /dev/parport0" doesn't seem to have helped. I also checked the permissions have properly been changed with "ls -la"

0 Kudos
Message 3 of 7
(2,575 Views)

777? maybe?

0 Kudos
Message 4 of 7
(2,564 Views)

No luck with 777 either. (im not sure if 777 should be used on device files, only difference is if they are executable)

0 Kudos
Message 5 of 7
(2,125 Views)
Solution
Accepted by TypT

Solution to run labview as root on centos 7:

install kdesu:

"sudo yum install kf5-kdesu"

run labview as root (from default install location):

"kdesu /usr/local/bin/labview64"

 

Enter the root password for the machine and labview should start running with escalated permissions.

If labview is installed in a different location you can find it with "which labview64"

 

"sudo /usr/local/bin/labview64" may work as well but it is not recommended to run GUI programs as root directly.

Message 6 of 7
(2,110 Views)

Ick.  Thanks for sharing the solution with us, though.  This is bound to help someone.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(2,096 Views)