Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Linux preference

Hi,

In case of Centos 6.5, I think that error is connected with different version of rpm packages older NI-VISA and newer CentOS 6.5

My "winning" combination of rpm distribution is Mageia 2 32/64-bit and Scientific Linux 6.4 32-bit.

Note: you should install kernel-headers package before instaling NI-VISA.

0 Kudos
Message 11 of 49
(1,174 Views)

Hello Mig-31,

Can you communicate using USB?

Thanks for your advice!

Jorge Amaral

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 12 of 49
(1,174 Views)

Hello Jorge,

What you mean under USB communication? Because usually there is USB->serial communication adapter, which creates /dev/ttyUSB0 for example. This type of communication usually only about system driver.

0 Kudos
Message 13 of 49
(1,174 Views)

Hello again,

Till now I was able to communicate with my Arduino (don't know if you know this device) using it's software using /dev/ttyACM0. I also tried with a USB-serial adapter that also worked. But I never could do that in Labview.

I created a static link in "visaconf". But I never could open the port without error (and the motherboard opens correctly). Using "NIvisaic", I can see the USB device listed (because of the static link) but with a question mark on the top.

Do you know any tip that could help me at this point?

Thanks!

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 14 of 49
(1,174 Views)

Hello again,

I can serial device to VISA using VISA configuration utility. I can't discover it in Labview, because I don't any device with serial communication. I usually use communication over TCP.

0 Kudos
Message 15 of 49
(1,174 Views)

Jorge,

What error do you get when you attempt to use the statically-created entry? Also important, what are the permissions/ownership of the device itself, and finally which user is running LV?

Post the output of the following (with Arduino plugged in and LabVIEW running) from a terminal/console:

ls -l /dev/tty*

ps -e | grep -i labview

0 Kudos
Message 16 of 49
(1,174 Views)

Hello Brad,

I'm not using Labview development. I'm only using NIvisaic to test the serial port. Because of that, I think that the second command won't work (I teste and didn't worked ).

About the permissions I always do this:

0. su/pass

1. chmod /dev/ttyACM0

2. chmod /dev/ttyS0

3. chmod /dev/ttyS1

And they after configuring in "visaconf" they all apper listed on "NIvisaic". But I only can open the two serial ports of the motherboard. I can't open the USB port.

---------------------------------

ls -l /dev/tty*


crw-rw-rw-. 1 root tty       5,  0 Jan 31 14:32 /dev/tty

crw--w----. 1 root tty       4,  0 Jan 31 14:32 /dev/tty0

crw--w----. 1 root tty       4,  1 Jan 31 14:33 /dev/tty1

crw--w----. 1 root tty       4, 10 Jan 31 14:32 /dev/tty10

crw--w----. 1 root tty       4, 11 Jan 31 14:32 /dev/tty11

crw--w----. 1 root tty       4, 12 Jan 31 14:32 /dev/tty12

crw--w----. 1 root tty       4, 13 Jan 31 14:32 /dev/tty13

crw--w----. 1 root tty       4, 14 Jan 31 14:32 /dev/tty14

crw--w----. 1 root tty       4, 15 Jan 31 14:32 /dev/tty15

crw--w----. 1 root tty       4, 16 Jan 31 14:32 /dev/tty16

crw--w----. 1 root tty       4, 17 Jan 31 14:32 /dev/tty17

crw--w----. 1 root tty       4, 18 Jan 31 14:32 /dev/tty18

crw--w----. 1 root tty       4, 19 Jan 31 14:32 /dev/tty19

crw-------. 1 root root      4,  2 Jan 31 14:33 /dev/tty2

crw--w----. 1 root tty       4, 20 Jan 31 14:32 /dev/tty20

crw--w----. 1 root tty       4, 21 Jan 31 14:32 /dev/tty21

crw--w----. 1 root tty       4, 22 Jan 31 14:32 /dev/tty22

crw--w----. 1 root tty       4, 23 Jan 31 14:32 /dev/tty23

crw--w----. 1 root tty       4, 24 Jan 31 14:32 /dev/tty24

crw--w----. 1 root tty       4, 25 Jan 31 14:32 /dev/tty25

crw--w----. 1 root tty       4, 26 Jan 31 14:32 /dev/tty26

crw--w----. 1 root tty       4, 27 Jan 31 14:32 /dev/tty27

crw--w----. 1 root tty       4, 28 Jan 31 14:32 /dev/tty28

crw--w----. 1 root tty       4, 29 Jan 31 14:32 /dev/tty29

crw-------. 1 root root      4,  3 Jan 31 14:33 /dev/tty3

crw--w----. 1 root tty       4, 30 Jan 31 14:32 /dev/tty30

crw--w----. 1 root tty       4, 31 Jan 31 14:32 /dev/tty31

crw--w----. 1 root tty       4, 32 Jan 31 14:32 /dev/tty32

crw--w----. 1 root tty       4, 33 Jan 31 14:32 /dev/tty33

crw--w----. 1 root tty       4, 34 Jan 31 14:32 /dev/tty34

crw--w----. 1 root tty       4, 35 Jan 31 14:32 /dev/tty35

crw--w----. 1 root tty       4, 36 Jan 31 14:32 /dev/tty36

crw--w----. 1 root tty       4, 37 Jan 31 14:32 /dev/tty37

crw--w----. 1 root tty       4, 38 Jan 31 14:32 /dev/tty38

crw--w----. 1 root tty       4, 39 Jan 31 14:32 /dev/tty39

crw-------. 1 root root      4,  4 Jan 31 14:33 /dev/tty4

crw--w----. 1 root tty       4, 40 Jan 31 14:32 /dev/tty40

crw--w----. 1 root tty       4, 41 Jan 31 14:32 /dev/tty41

crw--w----. 1 root tty       4, 42 Jan 31 14:32 /dev/tty42

crw--w----. 1 root tty       4, 43 Jan 31 14:32 /dev/tty43

crw--w----. 1 root tty       4, 44 Jan 31 14:32 /dev/tty44

crw--w----. 1 root tty       4, 45 Jan 31 14:32 /dev/tty45

crw--w----. 1 root tty       4, 46 Jan 31 14:32 /dev/tty46

crw--w----. 1 root tty       4, 47 Jan 31 14:32 /dev/tty47

crw--w----. 1 root tty       4, 48 Jan 31 14:32 /dev/tty48

crw--w----. 1 root tty       4, 49 Jan 31 14:32 /dev/tty49

crw-------. 1 root root      4,  5 Jan 31 14:33 /dev/tty5

crw--w----. 1 root tty       4, 50 Jan 31 14:32 /dev/tty50

crw--w----. 1 root tty       4, 51 Jan 31 14:32 /dev/tty51

crw--w----. 1 root tty       4, 52 Jan 31 14:32 /dev/tty52

crw--w----. 1 root tty       4, 53 Jan 31 14:32 /dev/tty53

crw--w----. 1 root tty       4, 54 Jan 31 14:32 /dev/tty54

crw--w----. 1 root tty       4, 55 Jan 31 14:32 /dev/tty55

crw--w----. 1 root tty       4, 56 Jan 31 14:32 /dev/tty56

crw--w----. 1 root tty       4, 57 Jan 31 14:32 /dev/tty57

crw--w----. 1 root tty       4, 58 Jan 31 14:32 /dev/tty58

crw--w----. 1 root tty       4, 59 Jan 31 14:32 /dev/tty59

crw-------. 1 root root      4,  6 Jan 31 14:33 /dev/tty6

crw--w----. 1 root tty       4, 60 Jan 31 14:32 /dev/tty60

crw--w----. 1 root tty       4, 61 Jan 31 14:32 /dev/tty61

crw--w----. 1 root tty       4, 62 Jan 31 14:32 /dev/tty62

crw--w----. 1 root tty       4, 63 Jan 31 14:32 /dev/tty63

crw--w----. 1 root tty       4,  7 Jan 31 14:32 /dev/tty7

crw--w----. 1 root tty       4,  8 Jan 31 14:32 /dev/tty8

crw--w----. 1 root tty       4,  9 Jan 31 14:32 /dev/tty9

crw-rw-rw-. 1 root dialout 166,  0 Jan 31 14:34 /dev/ttyACM0

crw-rw-rw-. 1 root dialout   4, 64 Jan 31 14:32 /dev/ttyS0

crw-rw-rw-. 1 root dialout   4, 65 Jan 31 14:32 /dev/ttyS1

crw-rw----. 1 root dialout   4, 66 Jan 31 14:32 /dev/ttyS2

crw-rw----. 1 root dialout   4, 67 Jan 31 14:32 /dev/ttyS3

----------------------------------------------

ps -e | grep -i labview

3258 pts/0    00:00:02 NIvisaic

--------------------------------------------------*---

Visaconf.png

NIvisaic2.png

NIvisaic_withSUPermissions.png

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 17 of 49
(1,174 Views)

The only thing I can think, since a device that's run through the CDC ACM system isn't a proper serial device (it just has some shared attributes) VISA doesn't like it since it is not able to support what it needs to do.

The USB-to-serial device should work properly, of course with either proper ownership/group settings (e.g. change the user that is running the software to be part of the "dialout" group) or change the permissions of the device to make that unneccessary (note: this is a security risk, if you plan on making this computer accessible to someone other than yourself, either by physical login or by remote access, and if this computer will be reachable by the Internet, assume that it will be remotely accessible since people will attempt to break into the system). If this machine is not meant to be used by others that you don't trust or will be insulated from the Internet, you can simply change the permissions on the device. Otherwise, change the user to be in the dialout group.

0 Kudos
Message 18 of 49
(1,174 Views)

Thanks Brad,

But unfortunely I already tried with no success. First I try it in windows (and it works) and then in centos.

I don't have security issues. I'm just using this as a prototype. So I always do "chmod 666 /dev/ttyACM0".

This is very strange.

Thanks

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 19 of 49
(1,174 Views)

Hello Jorge,

There is a possibility that this is a known issue with VISA 5.4. If you uninstall VISA 5.4 and then install VISA 5.3 you may have better luck recognizing your device correctly. In VISA 5.4 we added additional functionality for event based serial communication. However, for devices that do not respond to events VISA does not correlate them correctly in VISAIC which yields the behavior you are seeing. By reverting to the previous version this will ignore the changes based on event driven communication.

Ian M.
National Instruments
0 Kudos
Message 20 of 49
(1,174 Views)