LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Read Error

Hi Gregory,

 

When I write there is no error and additionally the instrument responds with a few beeps and appears to update the display reading.

 

The setting I have been using are the default when I open the VI/MAX and seem consistent with the manual.

data bits: 8, parity: none, stop bits: 1.0, flow control: none

 

I'm afraid I am not familiar with SCPI if you could point me towards a resource?

 

Thanks again.

0 Kudos
Message 11 of 33
(1,366 Views)

What about the Baud rate like Frozen mentioned? I think your manual documents all the commands you will need.

0 Kudos
Message 12 of 33
(1,362 Views)

First don't reinvent the wheel.

 

See if someone has already written a LV driver for this instrument. Go here and search for you instrument or a related instrument by TTi. I suspect that there is one already.

 

If not goto the manual and try the RANGE (page 33) command. This will help to get you writing to the inst. You should see it change ranges.

 

IDN? uses a write and a read. If that works then the remote commands in the manual will be straight forward.

 

Norm

 

 

Message 13 of 33
(1,354 Views)

Hi Gregory,

 

Back in the lab again. I have tired the Baud rates 300, 1200 or 9600 given in the manual but still encounter an error in read, both using a VI and in NI MAX.

0 Kudos
Message 14 of 33
(1,318 Views)

Hi Norm,

 

Thanks for your reply. I have looked the LV driver for TTi meters which look promising. It produces a chirp from the instrument at 'write' but again throws an error at 'read'. Currently I am unable to read from MAX.

 

I'm not sure if it is relevant but looking the View Attributes Tab in NI Max, Number of Bytes at Port = 0 and Is Port Connected have a Current Value: Invalid Property Value.

 

Thanks again.

0 Kudos
Message 15 of 33
(1,308 Views)

What about your Rs232/USB adapter? Is is connected in the correct way to your instrument?

 

PIN2 (TX line) of your TTI has to go to the RX line of your RS232.

PIN3 (RX line) of your TTI has to go to the TX line of your RS232.

GND-line should be connected too.

 

Regards

Kudos are welcome...
0 Kudos
Message 16 of 33
(1,307 Views)

Hi Jens,

 

Thanks for your comments. I'm not sure how I might be able to check this? There is a 9-pin RS232 port at the back of the TTI instrument which is then connect to the USB adaptor, is it possible to check the lines individually?

 

Thanks for your time.

0 Kudos
Message 17 of 33
(1,291 Views)

It is not completely clear to me if the DB9 connector on the TTI multimeter is a female or male connector, also I strongly assume it is a femals one.

If that is the case then attaching your USB/RS232 directly to your instrument should be correct.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 18 of 33
(1,269 Views)

@te_surrey  ha scritto:

Hi Jens,

 

Thanks for your comments. I'm not sure how I might be able to check this? There is a 9-pin RS232 port at the back of the TTI instrument which is then connect to the USB adaptor, is it possible to check the lines individually?

 

Thanks for your time.


Checking the RS232 lines in "live action" can be done, but it's a little complicated (you need to disassemble connectors and use an oscilloscope) and probably useless.

You may be happy checking electrical continuity on the cable pins. At least, you don't need to get other instruments...

Unless you already know from other tests that the cable is OK, of course.

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 19 of 33
(1,252 Views)

SCPI Commands are a fairly common set of commands used to write to, and query instruments. They are basically a combination of shortened words and question marks if you're making a query. IDN? for example is an ID Query. If you're already messing around in MAX and you can detect you device and open the test panel for it you'll be able to see a set of SCPI commands that you can try and send to the device.

 

I'm a fairly new user myself so take anything I say with a grain of salt. I was curious if you've tried the sollutions listed in the white page for the error code?

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6FmSAK

 

It seems to suggest that there is already a VISA Session open, or some other process causing issues with the session you're trying to use or with the buffers you're trying to read.

 

If your serial settings were off like your baud rate or parity it would likely give you a framing error I believe. I hope this is helpful.

0 Kudos
Message 20 of 33
(1,249 Views)