Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get data in serial communication

I would like to create a program that acquires temperature data from an optical fiber thermometer and makes real measurements with LabVIEW.

Currently, when I connect an optical fiber thermometer to a PC and send a command using the "simple serial" in the LabVIEW sample program, I have confirmed that bidirectional communication is possible because a response is returned.

However, when I send the command to start measurement, the data (hexadecimal) that should have been sent is not sent.
The measuring instrument has started measuring and the temperature is displayed on the monitor.

I think it will probably improve the sample program (simple serial) I'm using now, but I have no idea how to improve it.
If anyone knows, please give me some advice.

 

0 Kudos
Message 1 of 24
(1,290 Views)

A comon 'problem':  the hex data could include characters that the simple demo vi interprets as 'end of tranmission' (CR,LF,..)

You should disable the termination character functionality.

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 24
(1,268 Views)

Do you have a link to the manual or something describing the message protocol?  I think we can set you up with a much better option than the "simple serial" example.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 24
(1,266 Views)

Thanks for the reply.

In the "Simple Serial" program in LabVIEW, there is no place to disable the terminator.

What exactly do I need to fix to disable it?

After disabling it, how do I get the data from the measurement device?

0 Kudos
Message 4 of 24
(1,248 Views)

Thanks for the reply.
I don't have a link to the specific message protocol, but I'm trying to send and receive commands from the instruction manual of the measurement device.
Does this mean I don't need to use the simple serial program?
If there is another way, I would like to know about it.

0 Kudos
Message 5 of 24
(1,246 Views)

If you tell us the type and model of your fiber thermometer (and to ease things for people who like to spend time on your question, a link to the manual 😉 )  we can look up the details of the rs232 comunication you are not aware of (old protocol, known common 'problems')  RTFM really helps 😄

 

Oh, and RTFH (read the fantastic help ) on the init/open serial port vi  and all the serial vis and properties of VISA (serial) helped us in the past and you in your actuall task ...   

 

If you provide us with the information we request , I'm shure we can help you.

the simple serial vi just show the simplest concept on how to line up the basic vis...  like: here is the car, here is the key... but you need to know how to drive the car and you need to know the rules!

And the fun fact: in rs232 there are nearly no rules, so everyone (every country, city, ..or device) made their own, so it's easy to crash 😄

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 24
(1,237 Views)

@Henrik_Volkers wrote:

And the fun fact: in rs232 there are nearly no rules, so everyone (every country, city, ..or device) made their own, so it's easy to crash 😄


That is because RS-232 is just a hardware standard.  It defines logic levels, connectors, and signals.  But it does not define how the bits are to be interpreted.  UART, which defines the data framing (start and stop bits, bits per byte, parity), has become another standard on top of RS-232.  Above that, it is completely up to the device manufacturer how the data is interpreted.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 24
(1,229 Views)

@crossrulz wrote:

@Henrik_Volkers wrote:

And the fun fact: in rs232 there are nearly no rules, so everyone (every country, city, ..or device) made their own, so it's easy to crash 😄


That is because RS-232 is just a hardware standard.  It defines logic levels, connectors, and signals.  But it does not define how the bits are to be interpreted.  UART, which defines the data framing (start and stop bits, bits per byte, parity), has become another standard on top of RS-232.  Above that, it is completely up to the device manufacturer how the data is interpreted.


Jep, just layer 1 ... mostly we fight layer 8 😄

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 8 of 24
(1,226 Views)

The URL of the fiber-optic thermometer that we are currently using is shown below.

It is a Japanese product, so it is available in Japanese.

 

https://www.anritsu-meter.co.jp/instrument/FL_FLC/fiber/detail/fl-2000.html

 

If you have any programs to add to the sample program (simple serial), please let me know.

0 Kudos
Message 9 of 24
(1,215 Views)

Here's a link to the English manual: https://anritsu-meter.com/vc-files/downlord/manual_en/FL-2000_manual.pdf 

 

Unfortunately, it doesn't really tell me any good information.  They expect you to just use their software.  But based on your first post, you know what the commands are supposed to be.  Do you at least have that information?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 24
(1,207 Views)