08-06-2012 04:30 AM
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 ?
08-07-2012 09:31 AM
in order to do that, you will have to create a "custom device" which uses a LabVIEW VI to utilize the RS232 communication. See
NI VeriStand 2010 Custom Device Developer’s Guide (Beta)
in the attached PDF there, and use the following VI for your new custom device:
Performing Concurrent Serial VISA Read and Write in Parallel Loops
Also a rought Guide to custom devices:
Building Custom Devices for NI VeriStand
09-25-2012 06:53 AM
10-11-2012 12:15 PM - edited 10-11-2012 12:20 PM
I have followed this logic:
1. Custom Device template
2. Easy Custom Device Tool - https://decibel.ni.com/content/docs/DOC-14654
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-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.
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?
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,
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.