Jump to content

Recommended Posts

Posted

I am trying to design a flow control for a stepper motor, it is to regulate hydraulic flow.

The valve that the stepper motor controls, turns 270*   

I have a HMI, i set a value of 75, the stepper motor moves 75 steps, i then increase the number to 120, it increases 45.  The crux is, if i put in 60, i need to drive back 60 steps.  I have a an out put to drive reverse, i have a setting to say the new setting is lower than the previous setting. Q how do i retain the first number, compare this to the second number, make the change, then move the second number to the first number and then add a third number, to become the new reference?

Regards

Mike

 

 

Posted

If I understand correctly:

The first value you provided is 75.
The second value you provided is 120, which means the angle increases by 45.
The active angle became 120.

However, when you enter the value 60, you want it to count down from 60 and reach 60 degrees.
I think the algorithm below will work:

sample.jpg.ed200201da9f047b35d56be52f5a7

Posted

Many HMI products have a way to write the new value to a different register than the one being displayed.  You could also write a program so that the current position of the value is backed up to a different register, and then a compare looks for the value to change, calculates a difference, and then works from that value.

Posted

Many HMI products have a way to write the new value to a different register than the one being displayed.  You could also write a program so that the current position of the value is backed up to a different register, and then a compare looks for the value to change, calculates a difference, and then works from that value.

Posted

I know I'm a bit late to the party but here is a way if the value changes shift the previous value down the shift register & update the new value, this way it does not need any other mods to the HMI or rely on buttons, just for clarity either more or less value equals a bit & stores the difference i.e. + or - from the previous position.

image.thumb.png.77e09a048eaede9a915e5386a9b23ba1.png

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.   Restore formatting

  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...