LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two laser diode connected onto single VI logic

Hello folks,

Greetings of the day!

 

I have built VI logic for single laser diode but now I need to connect another one (totally 2 laser diodes) so how do I can make the changes in the VI logic. I am attaching the VI file for your reference. Please help me in this regard.

Your help will be highly appreciated.

 

Regards,

Madhusudan 

 

0 Kudos
Message 1 of 13
(974 Views)

You might get more if you save the VI to a previous version (20, or even 18)...

 

Without seeing your code, I'd say you should put what you have into subVIs, and make things work with an array (0..n) in stead of a scalar (1).

 

That's very generic advice, purely based on you posting 1 VI, and mentioning scaling up from 1 to >1.

Message 2 of 13
(936 Views)

I noticed you are using "Bytes at Port" in your serial communication. 

 

I recommend you watch this video: VIWeek 2020/Proper way to communicate over serial

 

But I will assume that a second laser would be on a second Com port. So in general you would do the same thing but send the command to whatever com port the laser you want to control is on. 

 

Also you might want to think about using a loop that waits for a command, sends the command, then waits again. That way you don't have to launch your program every time you want to turn one off or on.   

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 13
(916 Views)

Hello,

 

Please find the attached VI saved to previous version 19. Please do the needful. 

Many thanks for your kind response.

I highly appreciate your support and help being provided.

 

Regards,

 

0 Kudos
Message 4 of 13
(911 Views)

Hello,

 

Many thanks for your kind reply. I am grateful for you valuable suggestions. Could you please help me by updating the attached VI file and revert back with updated one. As I am beginner to LabVIEW and don't know most of things in LabVIEW. I am trying to learn and understand the things on this LabVIEW platform.

 

Please do the needful.

 

Many thanks for your kind help and support.

 

Regards,

0 Kudos
Message 5 of 13
(907 Views)

Hi

 

Look at the example and ask in this thread until you have a correct working program.

As commented already this version does not yet have an eventstructure.

But you probably want that too.

greetings from the Netherlands
Download All
0 Kudos
Message 6 of 13
(850 Views)

Sorry I forgot to connect the second settings input.

greetings from the Netherlands
0 Kudos
Message 7 of 13
(844 Views)

Hello,

Greetings of the day! 

 

Many thanks for your help. Could you please send me these files in NI Labview 22 or even lower version. As I am unable to open in my system. It would be a great help.

 

Regards, 

0 Kudos
Message 8 of 13
(818 Views)

You posted a VI that sends "cof" to serial port COM1 and reads back a response. 

 

If you want to combine two of them, simply:

1) Create a NEW VI. 

2) Drop TWO copies of "Test Laser.vi" on the block diagram and you will have TWO VISA controls and TWO string indicators (BTW, learn to ALWAYS label you controls and indicators!).

3) Set one port to COM1 and the other to COM2 (or whatever port you connected).  

4) Run the new VI.

 

That's it.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 9 of 13
(809 Views)

I just noticed you didn't even hook up your connector pane.  You should do that and add error in and error out terminals so you can use your VIs as SubVIs.

 

If you don't know how to do that, you should stop coding and read the basic LabVIEW tutorial before you continue.  Especially if the laser is above a few milli-watts.  🤕

 

LabVIEW Tutorial (ni.com)

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 10 of 13
(804 Views)