VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using serial RS232 ports and other NI I/O cards in veristand (excluding Multifunction DAQ cards)

Hi,

I've managed to get a model (.mdl) running in Veristand (and deployed in RT) with no problems, and am able to use a DAQ card for I/O mappings. I cannot however seem to figure out how to interface with RS232 or RS422 I/O on the chassis. The objective is to send a string of data via serial to control a separate system. So I have two questions:

Is this possible?

If yes, then how?

 

I also have Labview 2009 available with RT toolbox. Veristand version is 2009

Appreciate any help


James

0 Kudos
Message 1 of 10
(10,668 Views)

Hi James,

 

the NI VeriStand (NIVS) 09 implementation doesn't provide any configurable access to RS232/422.

Since you have LabVIEW and the Real-Time module available, I suggest that you create your own Custom Device (CD).

There is a whitepaper available that describes on how to create a custom device for NIVS:

http://zone.ni.com/devzone/cda/tut/p/id/9348

 

 

Another interesting side might be the add-ons for NIVS 09:

http://zone.ni.com/devzone/cda/tut/p/id/9346

 

 

If you have problems implementing the core logic for the RS 232/422 communication, you might want to check out this example:

http://decibel.ni.com/content/docs/DOC-4811

 

 

Let me know if you have other questions!

Tom

0 Kudos
Message 2 of 10
(10,657 Views)

Thanks for the quick response. The white paper suggests that the custom devices for VeriStand is more geared towards integrating 3rd party I/O. Since we are looking to use the standard NI RS232 (on the PXIe 8108 controller) supported by labview, could we not do it in the following way:

 

  1. Create a VI (Labview) to handle handle serial comms messages etc.
  2. Import that VI and the model (dll) into VS and map the model to the VI using veristand.
0 Kudos
Message 3 of 10
(10,640 Views)
  1. Create a VI (Labview) to handle handle serial comms messages etc.
  2. Import that VI and the model (dll) into VS and map the model to the VI using veristand.

How do you want to 'import' that VI?

The only way in 2009 to import custom code is through custom devices. I think the wording in that whitepaper should not only say 3rd party hardware but everything that is not natively implemented in VeriStand can be added by creating a custom device. Depending on the requirements, the serial communication custom device can be either an asynchronous or an inlined custom device. If the VISA read function is blocking, an asynchronous CD is the better choice otherwise the subsequent code has to wait until the VISA read returns.

 

0 Kudos
Message 4 of 10
(10,627 Views)

Thanks. I've managed to add the example 'RT logger' to the custom devices without any problems, but my main concern is not th adding of custom devices, but how to create the VIs themselves. I can't seem to find any real help on this and it certainly isn't intuitive.

 

Please could you give me a quick overview. It imagine it should be quite simple, all I want to do (initally) is write a string to RS232 serial port, with no reading, to run on a real time target.

 

I have attempted to use the custom device template tool, but when you select the new custom device the error box says that files are missing and does not add the device.

 

Any help would greatly appreciated, I still am surprised that a simple serial port is not inherently supported in VeriStand 2009 though!

 

Thanks in advance

James

0 Kudos
Message 5 of 10
(10,596 Views)

Hi James,

 

I think there are quite a few things that are not natively supported in NIVS, but we are always looking for feedback to improve the product over the time. It is definitely a valid point to say that the serial communication is very easy, but to implement, test and maintain it takes some time which has to be compared to the amount of users that actually really use this feature. Fortunately we do have the option to import customer code which makes it 'easy' to complement VeriStand with user code.

 

Since your custom device doesn't show up/can't be added in System Explorer, I assume that you have not created the source distribution. Attached pls find two links to different screen-records that show how to use the template tool, the system explorer page and the driver VI. After building the source distribution of the configuration part, pls make sure to relaunch VeriStand.

 

 

System Explorer Setup

Driver VI

 

 

Thanks

Message 6 of 10
(10,593 Views)

Sorry, the company internet filter is not letting me open those links.

0 Kudos
Message 7 of 10
(10,576 Views)

I have uploaded the screen records to the NI FTP server.

ftp://ftp.ni.com/outgoing/NIVSForum_James.zip

Message 8 of 10
(10,566 Views)

Hi,

I've seen your screen-records and it really helped me. 

So I have made exactly all you did, but when I try to add my Custom Device in the system defiinition file, I have an error message : RS232 Configuration.llb\RS232 Initialization VI.vi is missing. Actually it's not !

As for me I think I have to add something in this VI ( to make the connection between the XML file and the custom device) but I don't know what....

 

any help will be really appreciated.

 

Regards

 

Cyril

0 Kudos
Message 9 of 10
(9,286 Views)

Hi, Thsa.

 

I have read your answer about how to intergrate the serial ports into veristand. (url: http://forums.ni.com/t5/NI-VeriStand/Using-serial-RS232-ports-and-other-NI-I-O-cards-in-veristand/td...).

 

that is great help for me. further more, could you put your screenshot of System Explorer Setup and Driver VI on FTP again. I cann't open the video anywhere.

 

Thank you!

0 Kudos
Message 10 of 10
(8,979 Views)