LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment HOW TO help

Set Init value = 8

Set wait (ms) = 1000      <- 1 second

Set N in the for-loop = 7  (or 8 if you want to see "16" in the counter)

 

Counter will start at 9 and then reset when it comes to 16.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 21 of 52
(1,620 Views)

@hlod wrote:

Well I tried but with no success: try delay also timer...

Also I have problem, because, when I stop, it doesn't go from the begginin but it's stay at 16...


Will you please attach your own vi.  Then I can tell you what you are doing wrong.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 22 of 52
(1,589 Views)

Waldemar already told him what's wrong I'll bet.  He's not writing to the device while the loop is running but waiting until afterward.

 

hlod:  This is very basic.  If your code isn't in a loop there is no timing.  That's what loops are for.

1.  Init your hardware...   2.  Write data to it IN A LOOP...   3.  Close your hardware.

 

See the pic for an example.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 23 of 52
(1,567 Views)

Well it's not working, I do it like this:

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 24 of 52
(1,543 Views)

Have you worked through the LV tutorials?  Your question and the image of the VI suggest that you do not have a basic understanding of dataflow.

 

The for loop will run to completion before any data is available at its output.  So the double indicator will only show the last value = 16.

 

I have lost track.  Exactly what is it that you are trying to do?

 

Lynn

0 Kudos
Message 25 of 52
(1,535 Views)

@hlod wrote:

Well it's not working, I do it like this:


How come I can't see his pictures?  They show up as red X's.

 

@hlod:  I have asked you before to attach your vi, NOT a picture but the VI itself.  Why won't you do what is asked of you?

 

- tbob

Inventor of the WORM Global
Message 26 of 52
(1,519 Views)

As you might expect tbob, he's completely confused on the whole dataflow concept.

 

hlod, look at this way to do it with just a while loop.  Do you understand that you MUST have your delay AND your Write to your Agilent device in the SAME LOOP!

21391i520F93544C12192D

 

Please take everyones advice and take the LabVIEW tutorials:  http://www.ni.com/gettingstarted/labviewbasics/

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 27 of 52
(1,510 Views)

/

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 28 of 52
(1,480 Views)

I saw that! Smiley Tongue You figured out the 'Add.vi' would work didn't you?  You're starting to get it! Smiley Happy

 

I would still suggest you look at the LabVIEW 101 tutorials.  Once you get comfortable with LV basics it becomes a lot more fun to program with it.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 29 of 52
(1,475 Views)

"Well the last one option is working, many thanks!

 

Is there any "operator" which replace "increment for +1", because I relaized that I need various increment, not every time +1. So I would like to step for  0.1 or 0.2, or 0.5, or 1....not every time +1. I was looking for last solution!

 

I tried to replace   i(loop opearation) with numeric v32(so I can set) step but then is not working, logically beacause it is not in loop...any ideas?

 

Any solution for this?

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 30 of 52
(1,473 Views)