Heald33

90-30 Timer over 16 minutes

8 posts in this topic

I have a 90-30 system.  Once a timer gets to 16 minutes, it goes back to 10 and it never really times out.  I am using an HMI to set the timer. I multiply that number and use it at the PV.  I thought maybe I needed to use a DWORD, but once I changed my register and all of my timers, and tested it, it still did the same thing.

Thoughts???

3 people like this

Share this post


Link to post
Share on other sites

You chose not to display the addresses in your screenshot, but I expect your problem may arise from an address overlap. The MUL_DINT instruction writes to two consecutive %R addresses. If those two addresses are also used by your TMR_Tenths function that could be the source of your problem. Refer to my answer at PLCTalk.net

4 people like this

Share this post


Link to post
Share on other sites

I have already realigned my %R register to account for the expansion.

1 person likes this

Share this post


Link to post
Share on other sites

If you can post the addresses you're using or a readable screenshot, I'll try to see if I can duplicate your issue. I can't read the address for the variables at IN1 and Q of the MUL_DINT instruction nor for those at the PV of the TMR_TENTHS or the address of the timer function itself.

And what time period are you trying to use? Are you setting a preset of sixteen minutes or does the accumulated time revert back to ten minutes when it reaches sixteen instead of timing to the desired value?

If your employer will permit it, post a copy of your project file and I'll check for address overlaps elsewhere in the code. Also let me know what version of Proficy Machine Edition you're using

1 person likes this

Share this post


Link to post
Share on other sites

I think it might be a conflict with my HMI. I was watching the PLC while online, and timing it, and it seemed to be fine.

Variable Report.csv

3 people like this

Share this post


Link to post
Share on other sites

Your variable setup is asking for trouble. You may be getting away with it, but in my opinion it is a ticking time bomb.

The 90-30 timer is a 16-bit instruction. It uses an array of three 16-bit WORD variables. You can't turn it into a 32-bit instruction by assigning an array of three 32-bit DWORD variables to it. From the variable list you posted I infer that you've done that for other timers beyond the one you cited.

If the HMI allows the operator to enter a value that results in a timer preset greater than 32767 you'll get incorrect results.

My suggestion is to get rid of those DWORD arrays assigned to timers and restrict your usage to WORD arrays.

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now