I am using raspi Cm4, as the documents stated out Cm4 exist 5 uart and i enable and dtoverlay uart2,uart3. however, in labview linx device not able to use them. how can i fix it?
Solved! Go to Solution.
The number of UARTs that Linx supports are hardcoded in the liblinxdevice.so library. But you are trying to use VISA instead and that should support additional serial ports IF they are properly installed in Linux. There is a potential issue with VISA recognizing those UART channels though. Traditionally Linux installs serial ports as ttyXXXYY in the /dev tree. XXX depends on the serial port driver that is used to access them and YY is an increasing number. Linux also likes to install many pseudo ttySomething devices that are not real serial ports, so VISA can't just go and try to detect every device starting with tty in its name. You would end up with several dozen VISA serial ports that can not be used for communicating with anything useful.
So you need to do some work on your Raspi.
First complication is that the environment the LabVIEW executable runs in is not directly the Raspbian host OS but a sort virtual machine running inside your host OS. This uses the Linux chroot system.
So you need to open a command line shell on your Raspi and then change into that chroot subsystem:
sudo schroot -r -c lv
This will change the prompt to indicate that you are now operating inside the LabVIEW chroot environment.
Once you are in there you need to verify a few things about VISA.
Points 1 to 3 should not be relevant. If that was not correctly setup you could not even connect to the ASRL1 port.