NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Norman_Muc
Posts: 5
0 Kudos

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

Active Participant
Alex_Pi
Posts: 324
0 Kudos

Re: RS232/UART with Veristand 2011 SP1

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

 

NI VeriStand 2010 Custom Device Developer’s Guide (Beta)
http://www.ni.com/white-paper/12712/en

 

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
https://decibel.ni.com/content/docs/DOC-4811

 

Also a rought Guide to custom devices:

 

Building Custom Devices for NI VeriStand
http://www.ni.com/white-paper/9348/en

 

Member
Norman_Muc
Posts: 5
0 Kudos

Re: RS232/UART with Veristand 2011 SP1

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
Member
Taylor_H.
Posts: 7
0 Kudos

Re: RS232/UART with Veristand 2011 SP1

[ Edited ]

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.

 

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.

Member
Norman_Muc
Posts: 5
0 Kudos

Re: RS232/UART with Veristand 2011 SP1

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.

 

Member
Taylor_H.
Posts: 7
0 Kudos

Re: RS232/UART with Veristand 2011 SP1

[ Edited ]

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

Active Participant
StephenB
Posts: 431

Re: RS232/UART with Veristand 2011 SP1

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
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page