Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Control Problems

Hello all,
 
I have created a very detailed vi that is used to remotely control a spectrophotometer.  About fifteen commands are sent to the spectrophotometer five times to perform five different runs.  The vi runs perfectly, without error on the computer I originally created the vi on.  I created an executable for the vi and that executable works fine on the same computer.  The COM1 properties are 9600 baud rate, 8 data bits, no parity, 1 stop bit, and no flow control.  The RS232 control properties in the spectrophotometer are 9600 baud rate, 8 data bits, no parity, 1 stop bit, and no handshaking.  Perfect match, therefore I do not run into any problems.
 
When I try to run the executable on a different computer using LabVIEW Runtime engine 7.1.1, I encounter a major problem.....pretty much nothing happens.  The COM1 properties are the same for this computer as on the other computer, and the RS232 control properties on the spectrophotometer also stay the same.  The serial port is also perfectly fine, I checked through device manager and went through the entire troubleshooting process. 
 
Through hyperterminal when my spectrophotometer isn't in RS232 control mode I get a replication of what is on the LCD screen (wavelength and transmittance, then ready):
 
 
...when I am in RS232 control mode and I attempt to echo typed characters locally (asdfjkl; ), I only receive one letter, rather than a doublet:
 
Perhaps some connection at the serial port could be my problem, or some other type of problem involving my LabVIEW Runtime Engine and the version of VISA I am currently using.  Whichever VISA comes with LabVIEW 7.1 is the VISA I am currently using.
 
Any help with this matter would be greatly appreciated, I am starting to be pressed for time Smiley Indifferent

Message Edited by Steve.Briggs on 01-31-2007 09:54 AM

0 Kudos
Message 1 of 26
(6,756 Views)
If you get nothing at all with the LabVIEW program, one thing to check is to see whether you have the VISA aliases (i.e. Com1, Com2), assigned on the other pc. Did you install the full or run-time only version of VISA? Some older versions of the run-time did not create the aliases and your program had to use the VISA canonical name (i.e. ASRL1::INSTR, ASRL2::INSTR). There is a file called visaconf.in in VXIpnp\WinNT/NIvisa that contains the aliases if they exist. You can edit this file to add them or install the full version of VISA.
Message 2 of 26
(6,749 Views)

One of our techs told me that the computer I'm currently on has everything I need.  Seems he is wrong...

The NI folder contains only 3 folders; DataSocket, IVI, and Shared.

So what you are saying is I need to install a version of VISA and then make sure that the VISA alias for COM1 is correct.  Ok, this is beginning to make sense.

I did a search for "visaconf" on the computer that everything is functional on and 30 files were found.  The "vxipnp", and multiple "niVISAe" which are both MSM files.  The WinNT did not show up.

Thanks Dennis

0 Kudos
Message 3 of 26
(6,744 Views)
When you created the installer for your exe, you have to explicitly select to include the VISA run-time support for serial. Did you do that?
Message 4 of 26
(6,741 Views)

I did not.

My top level vi was my main vi, and included after I added that was the text file LabVIEW FPGA-errors, and the text file PID Control Toolset-errors.

I'm going to add the support file.  I went through RT Images to find NI-VISA and NI-VISA server folders, both with 3.1 and 3.3.1 folders within.  Within those folders I see numerous files, which is for the run time support of VISA?

Once again, thank you Dennis.  Sorry if I seem indolent, I am just completely fried and lost at the moment.

0 Kudos
Message 5 of 26
(6,739 Views)

I'm confused about the FPGA error file. What are you deploying your application to? A real-time system or normal pc?

Also, the folder I mentioned is under the root - C:\VXIpnp\ etc. To include serial VISA support, in the app builder, you go to the Installer settings and select Create Installer, then click the Advanced button. Check the Serial Port Support box. The created installer will then include your app, the LabVIEW run-time, and serial only VISA run-time.

0 Kudos
Message 6 of 26
(6,735 Views)

Ok, I got the Serial Support portion checked off.


@Dennis Knutson wrote:

I'm confused about the FPGA error file. What are you deploying your application to? A real-time system or normal pc?


After I add my main VI, an "Error Files" window pops up saying:

"Double click to include or exclude error files from:"

  • <LabVIEW>\project\errors
  • <LabVIEW>\project\errors\English
  • <LabVIEW>\user.lib\errors
  • <LabVIEW>\user.lib\errors\English

Then it gives me the option to check off the FPGA-errors.txt and PID Control Toolset.txt


Just a normal pc..

Thanks Dennis,

Message Edited by Steve.Briggs on 01-31-2007 11:08 AM

0 Kudos
Message 7 of 26
(6,734 Views)

Okay. If you don't use the PID and obviously you are deploying to an fpga, you don't need to include those.

I think including the serial support and re-installing the app will fix your problem.

0 Kudos
Message 8 of 26
(6,730 Views)
Still nothing happening to the spectrophotometer when I run the executable Smiley Sad
 
I wasn't able to echo typed characters locally through Hyperterminal.  Could that be a reason behind my troubles?
 
Perhaps there are further internal problems with this computer.  I'm trying to acquire another cpu to run the executable on.
 
In the mean time I'll answer any questions you have Dennis, or anyone else, in order to help you help me.
 
Thanks again,
0 Kudos
Message 9 of 26
(6,722 Views)

I'm not sure if the echo problem is related. I would think that if you can use Hyperterminal to send/receive, then that would verify that the port is okay. I've attached the code for a small VI that uses the VISA Find Resource function to list all of the ports and if the port has an alias, list that. I'm not sure if it would be faster to build this and run it or to install the full version of VISA.

Message Edited by Dennis Knutson on 01-31-2007 12:05 PM

0 Kudos
Message 10 of 26
(6,711 Views)