VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232/UART with Veristand 2011 SP1

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

0 Kudos
Message 1 of 7
(7,856 Views)

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

 

0 Kudos
Message 2 of 7
(7,846 Views)
Hi Alex, thanks for the answer. I am currently digging into the CD development. Since I have RT controller, do you know if the Labview RT Module is requiered to create the Labview VI for the Custom Device? Norman
0 Kudos
Message 3 of 7
(7,746 Views)

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.

 

10-11-2012 12-03-28 PM.jpg

 

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.

0 Kudos
Message 4 of 7
(7,674 Views)

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.

 

0 Kudos
Message 5 of 7
(7,657 Views)

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

0 Kudos
Message 6 of 7
(7,623 Views)

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.

Stephen B
Message 7 of 7
(7,614 Views)