LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA write error in Tektronix 3000 oscilloscope,command cannt be sended

I have downloaed the VI files of Tektronix 3000 series oscilloscope,and had a test,
but two error occured when I excuted the "tktds3K initialize.vi",I cannt resolve the
second error,so I need help.
First error is "Property Node (arg 2) in tktds3K Initialize.vi",I found data bits in this
file was zero,I changed it to 8.
Second error is "VISA Write in tktds3K Initialize.vi", I think it is a simple problem, but
I am a newbie of Labview  realm.


Thanks
Bo Gao

The default setting of RS232 is
baud rate 9600
EOf          lf
Flagging   Hard
Debug      off

In the test,the VISA resouse name is COM1.
0 Kudos
Message 1 of 11
(5,464 Views)

What was the actual error code that you got? Simply saying you got an error is not enough information. Just as a guess though, you might want to double check that the flow control and other serial parameters in the VI match the instrument. You can also try using Hyperterminal or MAX to communicate with the instrument. Sending a *IDN? should be enough.

0 Kudos
Message 2 of 11
(5,461 Views)
Hi,Dennis  Knutson
The information about error is
 Error -1073807339 occurred at VISA Write in tktds3K Initialize.vi
 Possible reason(s):
 VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.

 I have increased the waiting time,but unsuccessful

帖子被damodamodamo在09-02-2005 12:26 AM时编辑过了

0 Kudos
Message 3 of 11
(5,456 Views)
Are you sure that it's the write generating the error and not the read? It's almost always the read that this error occurs with and can be caused by any number of problems. First, make sure the serial settings in the VI match the settings of the instrument exactly (baud rate, parity, data bits, handshaking). Second, the VI uses a LF character as the terminator and you also have to verify the instrument is set to use this as well. Lastly, you have to have the correct type of serial cable. You need a cable that swaps the tx and rx pins. For a 9 pin cable, pin 2 at the pc end connects to pin 3 at the instrument end and pin 3 at the pc end connects to pin 2 at the instrument end. If you're using RTS/CTS, the same swap is done with pins 7 and 8. Lastly, I strongly encourage you to first try using Hyperterminal to communicate. If you can get the instrument to respond there and the VI still doesn't work, then you know the problem lies in the VI and not with the cable, instrument, or pc.
0 Kudos
Message 4 of 11
(5,451 Views)
Hi ,Dennis Knutson . Thanks very much for your advice.

"For a 9 pin cable, pin 2 at the pc end connects to pin 3 at the instrument end and pin 3 at the pc end connects to pin 2 at the instrument end. If you're using RTS/CTS, the same swap is done with pins 7 and 8."
The port type of RS-232 in  the oscilloscope  is DTE,male. The personal computer's serial port type is common,but I only know it is male, I dont know whether it is DTE or DCE,it may be DTE type.  A 9-pin-female-to-9-pin-female  cable is used simply to connect pc and oscilloscope. Am I wrong?

"I strongly encourage you to first try using Hyperterminal to communicate",I have never done this job before, anyway I will try my best.

Thank you very much again.

Bo Gao
0 Kudos
Message 5 of 11
(5,444 Views)
I have made short circuit between the pin2 and pin3 of the pc serial port.
I write a very simple VI file which simply writes and reads a string in COM1,
I success.

You advise me to do a test using HyperTerminal like this?
0 Kudos
Message 6 of 11
(5,444 Views)
Well, that could be step 1 but what I was recomending was a serial cable to the instrument and trying Hyperterminal with that setup. The loopback of the serial port on pc only tells you that the pc is fine. It doesn't tell you if the cable you connect to the instrument is correct or if the serial com parameters match between the instrument and the pc.
0 Kudos
Message 7 of 11
(5,444 Views)
As Dennis suggested,try using MAX ( thats Measurement and Automation - National Instruments software).
You should be able to communicate with your instrument using *IDN? command.
It will also provide you Instrument model plus serial number in text string also with number of bytes returned.

With reference to TKTD3K initialize VI you could attempt placing probe on error cluster data wire between GPIB setup case selector and query ID case selector. This would identify if error before visa write. Also try adding a time delay between VISA flush buffer and VISA write (*IDN).

Happy trouble shooting

chow xseadog
0 Kudos
Message 8 of 11
(5,438 Views)
Hi,Dennis Knutson
My problem is resolved.Thanks very much.Your advice about cable is very useful for me.
I make a new cable by myself,and the oscilloscope works very well,that's amazing.
Thanks again.
0 Kudos
Message 9 of 11
(5,429 Views)
Hi.xseadog.
When I make the new cable,the first test way is that you suggested.The osilloscope transmit the correct string.
Thanks very much
0 Kudos
Message 10 of 11
(5,428 Views)