Hello,
I posted a topic on a maintenance alarm system a few months ago which didn't quite work out, but now have a different project with it all together. I'm going to be adding a touchscreen (Mitsubishi F940GOT) to the system and changing the plc because currently it has 2 seperate plc's and neither is compatible with the touchscreen. I would like to simplify the code. First let me explain how the system works now.
Operator turns on a switch a light begins to flash in the shop (they are a total of 42 different lights) and a buzzer goes off with the light for 3 seconds. After that 3 seconds is over if they turn it back off they must wait 1 minute to turn it back on if they want the buzzer to sound again (this is to keep them from annoying us ). If the light is on for 15 minutes it will stay on solid. The powers that be want me to keep the conditions the same. I was able to shorten down the original version slightly. Here is a sample of my code.
The plc I'm using is a Mitsubishi A1S model. This seems like a lot of code (remember I will be repeating this 41 more times) especially since it will be so repetitive. I've looked through the manual several times looking for a "magical" instruction to solve the issue. Don't get me wrong I don't care to write out the program this way I was just hoping to learn something.
For the touchscreen logic I plan on splitting it out in 3 pages for different areas of the plant and recording time in minutes and occurences. For each line something like this:
By using division I will be using 2 data registers for 1 because of the remainder factor and remember this will be repeated 41 more times. I would also like to create a screen that would show which alarms were on currently and there downtime data, then remove them when turned off, but I cannot come up with a way remember I'm just a mechanic. Any suggestions, critisisms welcome.
I posted a topic on a maintenance alarm system a few months ago which didn't quite work out, but now have a different project with it all together. I'm going to be adding a touchscreen (Mitsubishi F940GOT) to the system and changing the plc because currently it has 2 seperate plc's and neither is compatible with the touchscreen. I would like to simplify the code. First let me explain how the system works now.
Operator turns on a switch a light begins to flash in the shop (they are a total of 42 different lights) and a buzzer goes off with the light for 3 seconds. After that 3 seconds is over if they turn it back off they must wait 1 minute to turn it back on if they want the buzzer to sound again (this is to keep them from annoying us ). If the light is on for 15 minutes it will stay on solid. The powers that be want me to keep the conditions the same. I was able to shorten down the original version slightly. Here is a sample of my code.
x0 m9020
-----11----------------11------------------(y40)
1st alarm I alarm flicker I 1st alarm lamp
I I
I C0 I
I----11----------I
15 minute alarm latch
x0 t0 t30
-----11-------------11-------------1/1------(m0)
I 1st alarm I buzzer stop unlatch alarm 1 latch
I I alarm 1
I I
I m0 I
I----11------I----------------------------(t0 k30)
alarm 1 latch buzzer stop
x0
----1/1-----------------------------------(t30 k600)
1st alarm Unlatch alarm 1
x0 m9032
----11----------------11-------------------(c0 k900)
1st alarm 1 sec flicker I 15 minute latch
I for alarm 1
I
I----------[incp d5]
t30
----11-------------------------------------[rst c0]
unlatch alarm
y40 t0
----11------------1/1----------------------(y75)
1st alarm lamp alarm 1 buzzer
buzzer stop
The plc I'm using is a Mitsubishi A1S model. This seems like a lot of code (remember I will be repeating this 41 more times) especially since it will be so repetitive. I've looked through the manual several times looking for a "magical" instruction to solve the issue. Don't get me wrong I don't care to write out the program this way I was just hoping to learn something.
For the touchscreen logic I plan on splitting it out in 3 pages for different areas of the plant and recording time in minutes and occurences. For each line something like this:
m9036
----11---------------------------[div c0 k60 d10]
always on bit I current downtime display
I
I---------------[div d5 k60 d12]
total downtime display
x0
----11---------------------------[incp d14]
alarm 1 occurences
By using division I will be using 2 data registers for 1 because of the remainder factor and remember this will be repeated 41 more times. I would also like to create a screen that would show which alarms were on currently and there downtime data, then remove them when turned off, but I cannot come up with a way remember I'm just a mechanic. Any suggestions, critisisms welcome.
Last edited: