LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control device with RS-232 commands in labview

 


@ybur wrote:

I already checked the baud. The command always returns an error message. Only when trying to read however. The error is...   BFFF0015

 

I am trying to give as much information as I can however, as I have already said. I am not too familiar with this stuff and don't know what information I need to provide. I would attach the manual if I could find one online. In MAX I am tring to do the command *idn? that is all...it doesn't work.

 

Is it really called Hyperterminal on the computer? I have terminal but I have a feeling that is not what you are referring to. I only have XP so I should have it according to your description. Do you know where it is located on the computer?

 

I have tried to contact the vendor about a program and they are still getting back to me.


Not very likely that the instrument spports the *IDN? command. You didn't find that in the manual, did you? You just ran the default that was in MAX. Read and study the manual and do a little researc on RS232 before you do anything else. Not a good idea to randomly send stuff to the instrument.

 

0 Kudos
Message 11 of 26
(1,766 Views)

Ok so I tried using the hyperterminal but it is super slow and doesn't seem to work for me. I don't know if I am doing it wrong or what. I am trying to send it a command that is shutter = 1 so that it will open. Nothing ever happens though...any ideas? Why is the hyper terminal so slow?

0 Kudos
Message 12 of 26
(1,732 Views)

Don't have any idea what you mean by 'slow'. Slow to do what?

 

AS ALREADY MENTIONED, if the command does not work, then the com settings are incorrect, the cable is incorrect, or any number of other things. You will have to do most of the debug yourself. Actually, you will have to do ALL of the debug yourself since you have not provided the make and model of the instrument, the instrument's manual, or the actual command you are sending.

0 Kudos
Message 13 of 26
(1,723 Views)
  • Make sure your cable is NOT a null-modem cable is one is not required, and vise-versa.
  • Check the manual to see if you need some type of Handshaking.
  • As mentioned, baud rate etc. should be set right.
  • Do a Loopback Test on your serial port (look it up).
  • Hyperterminal running slow is likely due to the instrument not understanding your command(s), it is is simply timing out.

 

Richard






0 Kudos
Message 14 of 26
(1,715 Views)

Slow to even let me type in the command each letter takes around 20 sec. is this normal?

 

I am slow to mention the device used since it is not actually mine and it is a very expensive device but here it is... It is a coherent verdi diode-pumped laser. The manual is not very helpful either...and I cannot find one online.

 

I am just trying to get a simple command to work but hyperterminal is really slow in my oppinion I want to be able to type in a command and see if it works but it seems to take forever...20 sec to type a letter seems a little much to me.

 

The command I am trying to send is to open the shutter.

SHUTTER = 1;

0 Kudos
Message 15 of 26
(1,701 Views)

I am using a serial cable...how do I know?

There is nothing I can see that says to handshake with it.

Baud is the same on the device and computer.

Loopback test worked.

How do I correct this timing out then?

 

0 Kudos
Message 16 of 26
(1,697 Views)

Ok I got the hyperterminal to work so now I will just be working on the labview program...any help is appreciated

0 Kudos
Message 17 of 26
(1,684 Views)

What did you do to get it working?

Richard






0 Kudos
Message 18 of 26
(1,680 Views)

If I may ybur, I am having very similar problems that you are having and was about to start my own thread to ask, but figured it would be a little redundant. Maybe my solution could help you.

 

I am also trying to connect with a device via RS232 cable and am able to transmit and receive signal when using hyperterminal but unable to do so using labview.

 

For example, the POWER ON command per the manual:

 

Request command format

OL, 1 [CR] [LF]

 

Answer command format

OK [CR] [LF]

 

When "send line ends with end feeds" is checked and I type "OL,1"[ENTER], I receive the answer "OK" in HT, but nothing happens when it is unchecked and I am assuming this is the same kind of problem I'm having in labview, as I do not get any return bytes there. I've also tried the following inputs with "send line ends with end feeds" unchecked:

 

OL,1\n

OL,1\r\n

OL,1\r

 

(After each typed line I press ENTER)

 

Every time I press enter, the cursor just returns to the left margin with no answer.

 

Anyone know what I need to do? Again, ybur, sorry, I don't mean to hijack your thread but this may help!

 

Thanks!

0 Kudos
Message 19 of 26
(1,672 Views)

When your string constant that you are sending says OL,1\r\n, is that in normal display mode for the string or \ codes display?

0 Kudos
Message 20 of 26
(1,669 Views)