Jump to content

Linearisation between a timer and a MI


Recommended Posts

Hi, 

 

I am trying to get a linearisation between a MI and a timer. Basically I need to have the following sequence:

T0=0      -> MI0=0

T0=3.25 -> MI0=1

T0=6.5   -> MI0=2

T0=9.75 -> MI0=3

T0=13    -> MI0=4

 

I need this kind of sequence for a Variable: List of Images. The entire sequence should be activated by a MB. 

 

Any idea on how to do this? I tried with a Drum FB but the output is in MBs. 

Cheers, 

Marius

Link to comment
Share on other sites

I'm not sure that using a linearization will scale it exactly as you wish. One way to ensure this is to use comparison statements linked to the timers current value.

 

Use the Load Timer/Counter Current to place the current value into another operand (MI, ML, DW). Please know that the timer stores values in increments of 10ms. So if the timers current value is 1.5 seconds it will store a value of 150 into the operand The stored operand can then be linked in 5 different comparison statements for your desired values using the Within Range function.

 

Also, please note that all of the timers use a count down sequence. Meaning if the timer has a preset value of 15.00 seconds the current value will start at 15.00 and decrease towards 0 within the logic. If you want to sequence to operate in the order that you mentioned you may have the change the comparison statements to correspond in reverse order.

 

Using an example of a 15.00 second timer:

 

If you want the MI to start at 0, then first comparison statement will use a range from 1500-11.76 (first 3.25s), and if true then store a value of 0 into the MI.The second will use a range of 1175-8.6 (3.25s to 6.5s), and if true store a value of 1 into the MI. And so on.

 

Hopefully this will work for your project.

Link to comment
Share on other sites

Hello,

 

 

I'm attaching an example of how to load the current value of a timer in count up form into MI.

This is a 1 minute timer example, you can use 13sec timer and replace 6000 with 1300.

Then just use comparison functions to achieve the image sequence you need by storing values in another MI linked to images list based on timer's current value.

post-784-0-61211800-1441034422_thumb.jpg

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...