08-06-2012 04:30 AM
Hi,
We have an PXI System with a real time controller 8102 and Veristand 2011 SP1. We need to communicate with an external HW via UART.
Can we use PXI serial cards e.g. NI PXI-8430/2 (RS232) for this ?
Can we use the RT controller's serial interface ?
Regards
08-07-2012 09:31 AM - last edited on 10-13-2024 02:15 PM by Content Cleaner
Hi
in order to do that, you will have to create a "custom device" which uses a LabVIEW VI to utilize the RS232 communication. See https://www.ni.com/docs/en-US/bundle/veristand/page/create-custom-device.html
Performing Concurrent Serial VISA Read and Write in Parallel Loops
https://forums.ni.com/t5/Example-Code/Performing-Concurrent-Serial-VISA-Read-and-Write-in-Parallel/t...
Also a rought Guide to custom devices:
Building Custom Devices for NI VeriStand
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000wy9ECAQ&l=en-US
09-25-2012 06:53 AM
10-11-2012 12:15 PM - last edited on 10-13-2024 02:15 PM by Content Cleaner
I have followed this logic:
1. Custom Device template
2. Easy Custom Device Tool - https://forums.ni.com/t5/NI-VeriStand-Add-Ons-Documents/Easy-Custom-Device-Tool/ta-p/3503200
3. VISA Serial open in Init.
4. VISA Read/Write in Execute
5. VISA Close in Stop
6. Build Device
7. Put Custom Device in <Common>\Custom Device folder
8. Import into VeriStand from the System Explorer.
NOTE: As far as i know you can only input or output doubles from a Custom Device via channels, no clusters, arrays, or whatnot.
This works great using a windows host, however I have not tried using a PXI. I am concerned however that the VISA resource name selection will not work for the remote device. In other words if i hit the refresh option under the VISA resource name dropdown menu will that be options for the deployment PC or the PXI? If anyone can verify that it does/doesn't it would be helpful. Of course if you know the PXI's VISA resource name you should be able to enter it manually.
Also @Norman, I am quite positive that you do not need the Labview Realtime Module, only VeriStand. If you are using the evaluation version you need to make sure to uncheck "Remove unused polymorphic VI instances" before Building for some reason.
10-12-2012 07:29 AM
Hello Taylor,
you are right, if you want to have serial communication within Veristand on a realtime controller you need to have LabView RT in addition to Veristand.
10-18-2012 11:25 AM - edited 10-18-2012 11:32 AM
Thanks for your quick reply.
However it would be nice to have some clarity on some of the above subjects.
1.
I know during the install of VeriStand there are components such as NI LabView RealTime NB-FIFO which come with the installer.
Are you saying that the full LabVIEW RealTime module needs to be installed alongside the full VeriStand install in order for the Custom device to run on Realtime Hardware such as the PXI?
Or are you saying that it will run, however not in real time unless you have the full LabVIEW RealTime module?
2.
There is still the issue of VISA resource name. Can anyone confirm that when the target device is selected in the VeriStand System Explorer, the VISA Resource name is taken from the Target device(PXI) as opposed to the Deployment PC?
Thanks in Advance,
-Taylor
10-18-2012 03:48 PM
I dont think you actually need the real time module.
The visa reference issue is simply because you are using the VISA control. Instead, use a string. The user will need to type in the name of the VISA device manually which they can get from MAX.