Modicon Timer Setpoint

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello
I have a second timer in a Modicon PLC program.
assigned to register 41745

The operator is going to have the ability to change
this Setpoint via Wonderware SCADA software.

How can I program this in the PLC so the operator
doesn’t have to convert minutes to seconds.

I would like for them to input 5 minutes instead of 300 seconds.
I’ve tried the DIV function but I’m not doing it correctly. I thought all
I had to do is use the div function to divide by 60 but it’s not working.

I appreciate the help
Thanks!
 
It's been a long time since I used Modicon PLC's, but as a first-up sanity check - shouldn't you be using multiply instead of divide?
 
When I input the Setpoint of 300 to register 41745.
I have to input it in seconds since it’s a second timer.
300 seconds / 60 = 5 minutes
I like to store 5 minutes into a register as a Setpoint that the
Operators can input.

What instruction would I use to accomplish this conversion?
I’ve tried the DIV instruction but it wants to
stored in two contiguous registers (displayed for high- order half, implied for low-order half)
I input my the 41745 on top, then put in #60 in the middle. I thought
it should populate the result on the bottom buts it’s not working

I appreciate the help

Thanks


Thanks
 
Last edited:
Oh right, I'm following now.

You can divide the setpoint (in seconds) by 60 and display it to the operator, but they won't be able to write back to it, because their input will just get overwritten by the PLC on the next scan, as it will again divide the timer preset by 60 and store it in your register.

The simplest way to achieve this would probably be to scale the tag at the SCADA end. Scale it so that e.g. the raw value from the PLC is 0-600 (seconds), while the Scaled value used on the SCADA is 0-10 (minutes). That way the SCADA will do the conversion in both directions (divide by 60 to display, and multiply by 60 to write it back).

Otherwise you'll need to have a tag in the PLC that represents your timer setpoint in minutes, and allow the operator to modify that value. Then in the PLC you multiply that value by 60 and move it into your timer preset.

Again, my modicon experience is from a while ago and my memory of the software very hazy, so I can't give you any more specifics unless you can post some screenshots to jog my memory.
 
As ASF said you'd be multiplying the 5 by 60, not using DIV.

I haven't used an old modicon for half a decade but I'm sure there was an Integer MUL instruction.

But as ASF also said, just scale in Wonderware.

From memory the default data type was an unsigned int 0 -65535.

So in Intouch tag, raw range 0-60,000 (sec) and the engineering range 0-1000 (min)
 
Thanks everyone
Yeah my goal was to have a PLC tag in minutes that I can write to from SCADA
So the operator can type in the Setpoint in minutes not seconds

I thought the best way to accomplish this would be to do the conversation in the PLC, but I’m in the same situation. I’m not sure of which function to use.

I will play around with the multiplication function

Thanks
 
Conversion (or conversation ;)) is usually the same as multiplying by 1, the only trick is to know what value to use for 1.

Start with this equation:
1minute = 60seconds[/code]Divide both sides by 1 minute:
Code:
1minute/1minute = 60seconds/1minute
1 = (60/1) (seconds/minute)
 1 = 60s/min
Also:
Code:
1 = (1/60)min/s
So [60s/min] and [(1/60)min/s] are both the same as 1.

1 is used for the multiplicative identity operation, that is, A*1 = A

If you have a time in minutes, you multiply it by "1":
Code:
5min * 1 = 5min * 60s/min = (5*60)(min s)/min = 300s
and voila, it's the same time duration (because you used the identity operation, A*1=A), but now it's in seconds. Conversely, if you have a time in seconds:
Code:
300s * 1 = 300s * (1/60)min/s = (300/60)(s min/s) = 5min
 
Depending on how old your CPU is, this could be off-topic.
If I remember correctly the old Modicon integer multiply took two 16-bit integers and put the result in two consecutive 4xxxx registers. That's because it doesn't two particularly large numbers for the result of the multiplication to overflow sixteen bits.
I think the divide might have been 32-bit divided by 16-bit to two consecutive 16-bit, one with the integer quotient, the other with the remainder.
 
Thanks for helping
I was able to get this working using the MULT instruction.


Thanks again everyone for the guidance and direction
 

Similar Topics

I'm sure this is a very simple question but what is the attached logic snippet doing? I suspect that it's implementing an on-delay / off-delay...
Replies
12
Views
10,399
i'm having trouble with the modicon timers. i'm using a model # 984-145, version software is 3.21, and also ladder logic development.
Replies
4
Views
2,134
Hey, any PLC Dinosaurs out there? I'm on a mission to convert all the remaining Modicon & Maxitron/Telemechanique systems over to A&B SLC 500 or...
Replies
1
Views
2,554
Hello All, Was hoping I could get a little help with Modicon ladder logic. This is the first time I have seen Modicon logic and currently trying...
Replies
6
Views
241
I have a 170AAO92100 card that I am interested in using as a 10 volt output. Is there setup that I have to do in order to change output or simply...
Replies
0
Views
80
Back
Top Bottom