ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Problem

I am very new to Labview, and am trying to make a VI to control a
laser for a physics experiment via a serial port, and I want to use
Labview to control it. Because I am new I have started by looking at
the basic serial read/write VI that comes with Labview 8.5 in order to
get a grasp on some of the fundamentals. I have used this basic VI to
send commands to the laser, but it only works some of the time. When
it doesn't work I receive an error message consisting of some portion
of the command that I sent, but no the whole command. For example: If
I want to change the current to the laser to 30% of maximum I would
write "current=0.30" to the serial port. When I do this the response
I get back is something like "Error:CURRENT0.30- 67" or
"Error:CURENT=0.3- 67" note that I am inputing "current=0.30" and that
I am not misspelling anything in the input. The laser is sending back
an error that consists of my input minus a few of the characters in
the middle. I am also in contact with the hardware manufacturer, but
I don't know if this is a hardware or software problem. Assuming this
is a Labview problem, I would be forever grateful if someone could
point me in the right direction.
0 Kudos
Message 1 of 4
(3,038 Views)
Have you tried communicating to the device directly with Hyperterminal? - Assuming Windows OS
Has the manufacturer given you a command set (I assume so, as you mention you have got it working occasionally)
_____________________________
- Cheers, Ed
0 Kudos
Message 2 of 4
(3,034 Views)

Can you post a simplified sample of your code?

If it works ok with hyper terinal, then it is not a hardware problem. Can you try this?

0 Kudos
Message 3 of 4
(3,031 Views)
On Jul 28, 11:10 am, Pnt <x...@no.email> wrote:
> Can you post a simplified sample of your code?
> If it works ok with hyper terinal, then it is not a hardware problem. Can you try this?

The VI I am using can be found here:
ftp://ftp.ni.com/pub/devzone/epd/basic_serial_write_and_read.vi

and in the write section I input (for example) "current=0.30\r".

If I have Hyperterminal, I doubt I have access to it (school computer,
and I don't have administrative access), so I can't try it that way
until I can get an admin in here, which I will try to do soon.
0 Kudos
Message 4 of 4
(3,014 Views)