From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

broken wire

Hi cantata,

 

why do you need to compare loop count with max number of iterations in a FOR loop?

 

And your description yells for "use a 2nd loop"!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 24
(899 Views)
You aren't doing any of that. You are using the same frequency for each of the 48 iterations of the loop. There does not appear to be any need for the comparison or the case statement. You are doing what appears to be a sweep and not fine tuning. If you want to do a sweep on consecutive channels, use a for loop around the code so that after the first sweep, you change the channel and the inner for loop would be executed again.
Message 12 of 24
(898 Views)

You are not stepping any inputs to the subVI, in fact the FOR loop will complete as fast as the computer allows.

 

What is happening inside the subVI (FTF)? Is that one interactive or is it just a formatting operation?

 

Why would the result of your division ever be equal to the interation terminal and why would that matter? What is deciding which case of the case structure should execute?

0 Kudos
Message 13 of 24
(896 Views)

Yes I want to sweep the frequency. I want to sweep by fine tuning the frequency.

the laser has multiple channels, and we can set the Grid Spacing between channels, the default value of Grid is 50GHz, I want to sweep every 0.1GHz,  I don't know if I can set the Grid to that small, so I wanted to use FineTuneFrequency (the maximum of FTF is 6GHz)

 

 

for example, choose channel1 first (frequency =100GHz), then fine tune by 0.1GHz, frequency=100.1GHz.  fine tune 0.1 again, frequency=100.2GHz..........loop for 10 times , frequency=101GHz. then jump to channel 2 (frequency of channel2=101GHz), then loop the FTF for 10 times.....then jump to channel3.....

 

so I want to use for loop to fine tune for 48 times, and jump to a new channel.....maybe the configuration I draw is wrong........could you tell me how to correct it ? Thanks!

 

 

0 Kudos
Message 14 of 24
(870 Views)

the input is FTF (FineTuneFrequency), and the subVI (FTF) is just a formatting operation.

 

I want to sweep the frequency. and when it executes for N times, the laser jump to a new channel. then tune the frequency for N times again...

0 Kudos
Message 15 of 24
(867 Views)

Hi cantata,

 

just a "concept drawing" from your descriptions:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 24
(863 Views)

another simple question: 

broken wire: the type of the source is 1-D array of VISA session of class, the type of the sink is VISA session of class.

 

How can I connect them together??? Thanks!

0 Kudos
Message 17 of 24
(813 Views)
Don't create an array of VISA sessions. Do you have something in a for loop and auto-indexing an output? Don't do that.
0 Kudos
Message 18 of 24
(808 Views)

I just want to close the VISA session. and in the for loop there is a channel sweep

Untitled.png

0 Kudos
Message 19 of 24
(804 Views)

As Dennis said:

DON'T create an array of VISA references!

 

If you don't know how to handle the situation until now I suggest going through the LabVIEW basics (free online courses offered by NI) and read the full help on the FOR loop!

 

(Or use the current LabVIEW version 2014 as it will help in exactly this situation. It was a nice webcast yesterday…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 24
(801 Views)