LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment HOW TO help

Well can anyone help me:

 

need to increase number from 1 to 10, for each 1 second delay; and output must be double("orange wire")!

 

Can anyone make scheme?

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

This should be fairly straightforward.  What have you tried?  What else is going on in your program during the delays?

 

Hint: shift register.

 

Lynn

0 Kudos
Message 2 of 52
(3,462 Views)

I will set with voltage from 0-10 (V), then in each 1 second i will measure current.

 

I only need double "output", so from 0-10, and 1 second time between numbers...

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 3 of 52
(3,451 Views)

Please post your code. You will learn more by finding out what you did wrong rather than just being given the solution.

0 Kudos
Message 4 of 52
(3,448 Views)

This is so basic that no one wants to write it for you.  We get bombarded by such basic questions way too much.  You really need to learn Labview.  There are free tutorials online at the NI website. 

 

In a text based language:

For i = 0 to 10

  Write i to power supply

  Wait 1 second

  i = i + 1

Next i

 

Or in C:

for (i=0;i<=10;i++)

  { WriteToPS(i);

     Delay(1000)  }  /*Delay is in mS.*/

 

Labview has an increment function to do i++.

Labview has a For Loop.  Use the shift register hint.

Labview has a Wait function.

Put them all together.  You can do it.

 

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 52
(3,425 Views)

Well is not problem that I didn't try, I have problem because need for ouput 64 bit double

 

20749iE30422942AB20B1B

 

Any help wit this..?

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 6 of 52
(3,417 Views)

Right-click the blue '0' constant.  Change representation to DBL.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 7 of 52
(3,414 Views)

You mean this? I cannot change it 😞

 

20751i55B78BD7DC05CFBC

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 8 of 52
(3,405 Views)

Changing to DBL will not fix the problem that the for loop is creating an array and you are trying to connect to an input that expects a scalar. What are you trying to connect to? Your image does not show this critical part. Why post a partial image instead of the actual VI? Trying to help when you provide information in small bits and pieces is not an efficient way to get help. Most of us are volunteers that may stop volunteering if we have to keep guessing.

 

As far as changing the data type, you really don't know the fundamentals. Right click on a constant and select 'Representation'.

0 Kudos
Message 9 of 52
(3,397 Views)

There is something you haven't posted that is causing issues but we can't see it.  Also, you still have a fundamental problem because you're not using a shift register to pass your incremented value around to the next loop iteration.  Here is one solution (see pic).

 

EDIT:  Yuck, I should have de-selected the loop before I took a screenshot but I'm sure you get the idea.

 

Please take tbob's advice and do some LV tutorials.  You have to know this basic stuff like the back of your hand before you can go on to more advanced coding.  Good Luck!

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 52
(3,386 Views)