LVMakerHub / LINX

LabVIEW Community Edition LINX
Other
111 stars 114 forks source link

Installed LabVIEW on an armbian embedded board, but cannot call the serial port #131

Open ericddm opened 4 months ago

ericddm commented 4 months ago

Dear developers and maintainers, I installed LabVIEW on WuKong Pi, a single board computer running Armbian, as shown in the picture: But I encountered a problem. It can only run vi that does not call the serial port. Once the serial port is called, the LabVIEW service stops. I wonder if I need to define this serial port somewhere? Please help me, thanks

微信截图_20240719234318 微信图片_20240719234511

samkristoff commented 4 months ago

Are you using the VISA VIs in LabVIEW to interact with the serial port? If so, VISA needs to be installed on the target (WuKong Pi).

Does LabVIEW throw an error when this happens?

ericddm commented 4 months ago

Dear samkristoff, hello, thank you very much for your attention to this question. First of all, I would like to add that this single-board computer can automatically run LabVIEW when powered on, and there is no problem running the blink program that does not require calling the interface. But when I start calling the linx vi, even if I just open the device, an error pops up:

Load Device Channels.vi loaded with errors on the target and was closed.

微信截图_20240720123410 微信截图_20240720123225 微信截图_20240720123705

samkristoff commented 4 months ago

When using local IO, the VIs calls into a shared object under the hood and the shared object will make target specific calls. This does not use the serial port.

It looks like your LabVIEW project is configured to treat your target as a BeagleBone black. The LINX shared object may have BBB specific code that fails to run on your WuKong Pi.

@sharpk do you recall how the correct LINX shared object gets on the target?

@ericddm I don't know anything about the WuKong Pi, but based on the name, I assume it's more like an RPI than a BBB. I'd try updating the LabVIEW project to add the WuKong Pi as an RPI rather than a BBB and see if that helps.

ericddm commented 4 months ago

Dear Sam, @samkristoff Thank you for your help and I look forward to your updates. To make my problem clearer, I tried the following. [1] Last time you said VISA needs to be installed on the target. I looked for the official NI visa driver, but there was no one suitable for Debian, as shown in Figure 1. [2] Figure 2 shows my other attempts. When using local IO, it is indeed stuck at initialization. [3] The Wukong Pi is a low-cost little single-board computer that costs about $10, and if you have the time to play with it, I would be relly happy to mail one to you. 44 22 33

ericddm commented 4 months ago

I just tried adding RPI (actually Wukong Pi) to the LabVIEW project. It can connect and run Blink, but it is also unable to call local IO. 555 666

ericddm commented 4 months ago

“When using local IO, the VIs calls into a shared object under the hood and the shared object will make target specific calls. This does not use the serial port.”

what should I do to call the GPIO and UART with LabVIEW on this Board?thank you for any help

sharpk commented 4 months ago

So everything, including the linx library (liblinxdevice.so) is installed by the debian package here.

There are separate versions of liblinxdevice.so for Raspberry Pi and BBB, and at install time a script is run to detect what hardware the package is being installed on and a symlink is created to the correct library.

You will likely need to create a new version of the LINX library in order to do the correct thing for your board to get IO working correctly. I doubt that the pre-compiled Raspberry Pi or BBB versions of the library will work on your hardware (although you can give it a try if you like).