LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Incrementing an integer gradually over a time period

Hello,

 

I am new to LabView, please bare with me.

 

I am trying to implement a timing system that will allow for gradual increase of an integer over a time period I specify. I have case structures use a wait function until the integer value is reached, which then signals a write function to a LabJack. I need the initial value to start at 3.175s and increase to 4.175s over a 16s time period. Does anyone have any idea how I can go about this? I am at a loss.  Attached is an image of my code so far.

 

Thanks in advance, Sar

0 Kudos
Message 1 of 3
(426 Views)

Can you please explain the application and how it is supposed to work?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3
(418 Views)

Hi Sar,

 


@spamlalamb wrote:

I am trying to implement a timing system that will allow for gradual increase of an integer over a time period I specify. I have case structures use a wait function until the integer value is reached, which then signals a write function to a LabJack. I need the initial value to start at 3.175s and increase to 4.175s over a 16s time period.


I don't see any integers in your image: all relevant values are orange!

 

  • It also doesn't make sense to start at 3.175s, incrementing with 0.001 and still implicitely round the resulting value to an integer U32 value before using the Wait function! You will get either 3ms or 4ms wait time!
  • Placing several case structure inside one loop, with different wait times inside each case structure will result in "the slowest will win" behaviour: THINK DATAFLOW!

So instead of attaching images of code (we cannot edit/run/debug images with LabVIEW!) you should explain your goal much better…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(358 Views)