Jump to content

Timer won't properly store ML value.


Recommended Posts

This logic works for (MI 3) values between 1-5 minutes, but after that the timer will always be preset to about 5 and a half minutes. I'm assuming this issue has to do with the timer not having enough bits? I want to be able to store preset values ranging from 1-360 minutes, any way to do this?

PLC is  a V570.

Thanks.

Visilogic Example.png

Link to comment
Share on other sites

  • MVP 2023

Another thing that occurs to me is that a 16-bit number (MI) has a maximum size of 32767, which translates to a little over 5 1/2 minutes on a timer preset. That is suspiciously close to the time you state is causing the problem. Your first calculation uses MI 3, but the result of the multiplication, and the rest of the calculations go to MLs, so there is no problem there at all. I would be looking for other instances of those MLs to make sure no other MIs are involved.

To be clear, your logic is fine and WILL work as is. There is a problem elsewhere in the program.

Link to comment
Share on other sites

4 hours ago, Flex727 said:

Another thing that occurs to me is that a 16-bit number (MI) has a maximum size of 32767, which translates to a little over 5 1/2 minutes on a timer preset. That is suspiciously close to the time you state is causing the problem. Your first calculation uses MI 3, but the result of the multiplication, and the rest of the calculations go to MLs, so there is no problem there at all. I would be looking for other instances of those MLs to make sure no other MIs are involved.

To be clear, your logic is fine and WILL work as is. There is a problem elsewhere in the program.

Ya not sure what's going on and this is the only net I use all those operands. I ended up just creating a timer display value on the HMI screen and enabling the timer to be set via the controller's keypad. Should've done that at the start!

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