LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change parameter(wavelength) of serial port instrument in Labview?

Solved!
Go to solution

Hello everyone,

 

I have a instrument, which is called Narrowband Tunable Filter. I can control it by HyperTerminal, because i know commands, but I have no idea how to do it in Labview. I know only basics in Labview. Can anybody help me to solve this issue?

0 Kudos
Message 1 of 13
(2,566 Views)

Hello,

I hope anybody will notice this message. Did you manage to control that laser with Labview?

 

I have the same problem, but I am using Optical Filter, which can change the wavelength. I can change it in HyperTerminal step by step. But my goal is to do it automatically in Labview and I have no idea how to it

0 Kudos
Message 2 of 13
(2,525 Views)

@ProTon4ik wrote:

Hello everyone,

 

I have a instrument, which is called Narrowband Tunable Filter. I can control it by HyperTerminal, because i know commands, but I have no idea how to do it in Labview. I know only basics in Labview. Can anybody help me to solve this issue?


Check out the VISA examples.

 

VISA is the way to talk to devices over TCP\IP, USB, RS232, GPIB, etc.

0 Kudos
Message 3 of 13
(2,521 Views)

Thanks for reply. I was trying some Labview Examples for Serial Connection, but I didn't achieve my goal. I know the command functions and so on, but I can not succeed. I am looking for somebody, who can explain me step by step, because it seems to me, that I am a little bit noob in LabVieW 😞

 

 

0 Kudos
Message 4 of 13
(2,516 Views)

Don't feel bad.  Although serial communication can seem laughably simple, the reality is that there are many, many subtleties that can make it difficult for you to achieve your goal.  Why don't you show us what you have so far, so we can help you fix it?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 13
(2,509 Views)

Well, I hope you cal help me.

 

That's what I have:

1) Instrument is the optical filter (http://www.wlphotonics.com/product/Narrowband_Tunable_Filter.html), which chooses the wavelength of detected sygnal. Spectral range of it is 1520 - 1580 nm.

2) I can change the parameter called wavelength (WL) in Hyperterminal program writing one line of command (for example, WL1550 -> ENTER). I know all possible commands. I am attaching a file "commands.jpg" and "example_in_Hyperterminal.png"

3) What I want is to change that parameter (wavelength) in the loop with concrete step in LabView. And also I would like to observe how it is changing (maybe kind of object called "current wavelength")

4) I found an example in Labview, which is called "Continuous Serial Write and Read.vi". I think I should modificate it a little bit and that will solve my problem. But I am not sure, in what way I have to modificate it!

I am attaching that Example.vi (but it is supposued to be in every Labview software).

Serial Settings - everything is clear, I know the value of needed parameters. 

The rest of the program is not really clear for me.

 

0 Kudos
Message 6 of 13
(2,502 Views)

The VI you attached doesn't show any attempt to modify it to fit what you want to do.  (PS:  "modificate" is not a word.)

 

Change the control for the input command to \codes view.  Make the display style visible on the front panel through the right click menu.

 

Then type in the command you want with the \r\n.  In \code display that will send the carriage return and linefeed characters the device is looking for according to the manual page you attached.

 

Here is a greatly simplified VI.

 

0 Kudos
Message 7 of 13
(2,496 Views)

Thanks a lot.

 

Now I can communicate with my device and I want to write several commands at the same time. I am not sure how to do it. I tried the simpliest idea. I have just copied 2 loops (check screenshot), but it doesn't work in proper way, because each Response Window doesn't show each Write Window. Now it works in the next way. Maybe for 10 seconds there is response in one window, then for next 10 seconds in the other window. Can you consult me with this, please?

 

And also I am interested if it is possible to determine command for Write Window to be permanent for the whole time (not to write from beginning when opening file).

 

 

0 Kudos
Message 8 of 13
(2,477 Views)

First, you didn't copy loops, you copied case structures.

 

You don't want them in parallel.  Remember when you are working with "serial" communication, you want things in SERIES.  But them one after the other.

 

"And also I am interested if it is possible to determine command for Write Window to be permanent for the whole time (not to write from beginning when opening file)"

I really don't know what you mean by this.

0 Kudos
Message 9 of 13
(2,471 Views)

Ok, I see.

 

Can you explain, what you mean by "you want things in SERIES.  But them one after the other."? I didn't catch this one.

 

 

0 Kudos
Message 10 of 13
(2,468 Views)