Home > Forum > Operator terminals (Weintek) > Control of furnaces for heat treatments
- This topic has 6 replies, 2 participants and was last updated 5 years, 11 months ago da Stefano.
-
AuthorPost
-
February 10, 2016 at 3: 32 pm #35937StefanoParticipant
I am looking for some suggestions for checking that I was commissioned. I would like to understand if it is feasible only with an operator panel (I was thinking of an MT6050iP) and some possible usable "trick".
I have two furnaces with installed a PID temperature controller that can be interfaced via MODBUS RTU on 485. Via modbus I can read the current temperature and set the various parameters such as setpoint, PID, maximum power. I have to automate parametrizable heating programs. The programs are basically of two types:
First:
1) Heats up to temperature A with maximum power X
2) at the temperature keep for C minutes
3) Heats up to temperature D with maximum power Y
4) at temperature D hold for E minutes
5) Heats up to temperature F with maximum power Z
6) Temperature Joint F hold for G minutes
7) EndSecond (which is none other than a part of the first):
1) Heats up to temperature A with maximum power X
2) at the temperature keep for C minutes
3) EndMy idea was to use a single panel and connect the two temperature controllers on an 485 bus. Then manage the parameters with the recipes and the transition between the steps with macro and scheduler. The two ovens must be able to operate independently and with manual start or pre-programmed at a specific time.
February 10, 2016 at 5: 23 pm #39359Sergio BertanaAdministrator ForumYes of course it is possible you can manage a cyclic time macro that performs all the operations for you, perhaps using a state machine with the operator Select Case.
Select Case [variable]
Case [value]
[Statements]
breakend Select
To make your cycle seems to me the best solution. Of course you will have two distinct but perfectly identical macros that will refer to modbus variables read by the two PID controllers. To read the registers use the operand GetData to write the operand SetData.
November 7, 2017 at 3: 50 pm #40009StefanoParticipantI resume this old post. The project has been working fine for quite a while on an MT6070iP (EB8000). However, the operators have just reported a couple of anomalies to me. The first anomaly relates to the following piece of macro:
sub CalcTimer(unsigned int time)
unsigned int minutes, seconds
minutes = time / 600
seconds = (time % 600) / 10
SetData(minutes, "Local HMI", "F2_MINREM", 1)
SetData(seconds, "Local HMI", "F2_SECREM", 1)
end subA value in tenths of a second is passed to the sub and this procedure writes it into two registers representing minutes and seconds. My oversight was to use "unsigned int" for "minutes" and "seconds", so "SetData" writes two adjacent registers and not the one I expected. This makes me dirty registers used for other things, fortunately only in display. My idea is simply to declare unsigned short minutes, seconds but I would like to understand if there are any possible truncation problems. That is, would the macro perform the calculation in a 32-bit variable and then truncate it to 16 (which would be fine by me), or would it truncate the 32-bit variable to perform the calculation in the 16 one?
Another very strange question is related to this piece of code:
unsigned int tick, prevtick, interval, elapsed, remaining
GetData(prevtick, "Local HMI", LW, 9030, 1)
interval = record[hold] * 600<
elapsed = 0while elapsed <= interval
GetData(tick, "Local HMI", LW, 9030, 1)
elapsed = tick - prevtickif elapsed > interval then<
remaining = 0
else
remaining = interval - elapsed
end ifCalcTimer(remaining)
DELAY(250)
wendThe operator presses a key that activates the macro that contains this code. The macro passes some time and updates two registers that display a countdown. This piece of code works perfectly. However, if I leave the panel on for more than a month, when the operator activates the macro it happens that the while loop exits immediately (surely a loop is done because the correct initial value of the countdown is displayed). Interval usually initializes at 30 minutes (30 * 600). This happens until I turn the panel off and on again. At that point everything goes back to working properly. I can't understand what it can affect. Are there any known bugs on the panel in the management of LW-9030 (32bit system time unit: 0.1 second)?
November 23, 2017 at 10: 12 am #40010Sergio BertanaAdministrator ForumFirst point
It would be correct to use short but beware all the operations would then take place at 16bit.Second point
For an accurate check it would take all the macro, but as a suggestion it could be verified that LW9030 overflow on the count returning to 0.November 23, 2017 at 10: 30 am #40012StefanoParticipant1 - Could I do the calculations on variables at 32 and then truncate them at 16. Is there a specific command for truncation or can I just assign the value of a 32bit variable to a 16?
2 - I can also post the rest of the macro but no timing values or LW9030 are touched, everything is done in the loop I posted. I ask if there are known bugs in the firmware because it is quite anomalous. In the LW9030 manual it is referred to as 32-bit system time in tenths of a second. It should therefore reach zero after 4294967295 tenths of a second, about 13 years, not after a couple of months. Furthermore, even LW9030 overflowed the count returning to 0, the behavior would indicate that after the overflow LW9030 remains at zero without increasing more, because even if I interrupt the macro and run it again, the same problem remains as long as I do not turn the panel off and on again.
November 24, 2017 at 8: 50 am #40013Sergio BertanaAdministrator ForumFor 1 point it is possible to perform all the calculations to 32bit, at the end it is possible to pass the result in variable to 16 bit which truncates the remainder.
For the 2 point, as soon as I find a moment, I check the behavior of the LW9030.April 11, 2018 at 10: 33 am #40075StefanoParticipantI contacted Weintek who, after months of verification, confirmed to me that there was a bug in the firmware related to the LW9030.
-
AuthorPost
- You must be logged in to reply to this topic.