Morse Coding a horn in ladder

Hi Lancie,

I did some simulation test with the information you gave me. Here's what happens:

My HMI button are configured as you thought, which is "Toggle" Maintained Contacts.

Lancie said:
The problem is that if ANOTHER horn button is pressed before the 2-minute Pause from the LAST horn function, then the way you had it before, there was nothing to reset the timers.

From my simulation test, I can see that the 2 minute Timer can reset each time one of the different signals are trigered. It goes back to zero up until the first message has been sent.

My main problem now, is for the MANUAL SIGNAL PUSH BUTTON that is set to Momentary Contact on the HMI. We want to be able to send one time manual messages (they won't need to be stored in memory). So, I think I understand what you are describing in your last post when praising the benefits of being able to have control over some setup memory bits that gives the ability to cancel a message, if another button is pressed in the middle of an ongoing sequence.

I ran first on that problem testing the MANUAL SIGNAL PUSH BUTTON with a Momentary Contact; as soon as the button is pressed then released during an ongoing message (for example LSS in the background, then I press the Manual Push), the ongoing message do not stop, it just repeats again reseting all timers (because my HMI button for message on the HMI are set to Maintained Contact).

So my current attempt is to add a reset for other bits when the Manual Signal Push Button is pressed.

From what I understand, using a memory bit that indicates an ongoing message is being sent or in queue for another transmission after the 2 min timer limit has been reached, would allow me to keep the lights of a Momentary Contact Button on the HMI screen, just keeping the memory bit active? But then could it be disabled by pressing again the same button like a Maintained Contact type? Should I add an OFF BUTTON on the HMI or this would be a waste of time in my case and I should use several bit reset like I did so far?

Much appreciated,
Alex
 
Last edited:
(for example LSS in the background, then I press the Manual Push), the ongoing message do not stop, it just repeats again reseting all timers (because my HMI button for message on the HMI are set to Maintained Contact).
That is the over-riding problem that will prevent you from doing a Reset of any horn sequence. Because you want to be able to cancel a previous horn function when you activate a new horn function, then you MUST NOT use a maintained-contact pushbutton on your HMI. Use instead a momementary-contact button that produces a "1" bit or ON to your PLC when pressed, and when released it goes back to "0". Then use that pushbutton to first reset, then seal in one of your Horn Function Relays (%M200 Horn Under Way, %M201 Horn Under Tow, %M202 Horn At Anchor, %M203 Horn Grounded, LSS Proxy, L Proxy, LL Proxy). For these horn functions, you should write rungs like this:

|(all momentary-contact) HORN |
| HMI Pushbutton RESET |
| Horn Under Way One-shot %M215 |
|------| |--------+-------------|P|-----------------( )---|
| | |
| HMI Pushbutton | |
| Horn Under Tow | |
|------| |--------+ |
| | |
| HMI Pushbutton | |
| Horn at Anchor | |
|------| |--------+ |
| | |
| HMI Pushbutton | |
| Horn Grounded | |
|------| |--------+ |
| | |
| HMI Pushbuttons | |
|(add all others) | |
|------| |--------+ |
| |
| HMI Pushbutton HORN Under Way |
| (momentary) RESET Relay |
| Horn Under Way %M215 %M200 |
|------| |----+----|/|------------------------------( )---|
| | |
| %M200 | |
|------| |----+ |
| |
| HMI Pushbutton HORN Under Tow |
| (momentary) RESET Relay |
| Horn Under Tow %M215 %M201 |
|------| |----+----|/|------------------------------( )---|
| | |
| %M201 | |
|------| |----+ |
| |
| HMI Pushbutton HORN At Anchor |
| (momentary) RESET Relay |
| Horn at Anchor %M215 %M202 |
|------| |----+----|/|------------------------------( )---|
| | |
| %M202 | |
|------| |----+ |
| |
| HMI Pushbutton HORN Grounded |
| (momentary) RESET Relay |
| Horn Grounded %M215 %M203 |
|------| |----+----|/|------------------------------( )---|
| | |
| %M203 | |
|------| |----+ |
| |
| HMI Pushbuttons HORN (add all) |
| (momentary) RESET Relays |
| (all others %M215 %M2xx |
|------| |----+----|/|------------------------------( )---|
| | |
| %M2xx | |
|------| |----+ |
| |

 
Last edited:
I forgot to add that for those horn functions that stay ON for 2 minutes then repeat, you may also want to add a Manual Reset (or Manual Stop) HMI momentary-contact pushbutton on a parallel branch with the other horn buttons that only activates the Horn Reset relay. That will allow stopping any horn function even if no other function is selected or needed at that time.
 
Hi Lancie, there seems to be a problem using the OSR bit in TwidoSuite or something else that I don't fully understand. The reason being is that we are not able to Seal-out the Sealed-in relay using the OSR on %M40.

When I remove the OSR the horn doesn't initiate at all, I think I can understand why, which bring us back to the reason why you wanted to use the OSR.

Looks like this program would only work with a clunky global reset on targeted bits and that the logic intended to set and reset bits using the seal-in/seal-out rungs.

The HMI button have been changed to momentary using the newly added memory bits.

UnSeal_Fail0.PNG UnSeal_Fail.PNG UnSeal_Fail2.PNG UnSeal_Fail3.PNG
 
Last edited:
The reason being is that we are not able to Seal-out the Sealed-in relay using the OSR on %M40.
%M40 is merely your One-Shot or rising-edge pulse that goes ON one scan each time the preceding Pushbuttons are pressed. You labeld it "OSR Horn Button". If you made %M40 a button in your HMI, remove it from the HMI immediately! %M40 should only be used by the PLC for the rising-edge one-shot pulse function! If you meant that %M40 is the "OSR for Horn Buttons" then there is no problem.

I think that you mean that you are not able to un-seal the Horn function relays using the new %M50 Reset. If that is the case, then probably you did not remove the old horn buttons from the HMI program and they are still in there as maintained-contact buttons. So every time the PLC turns one of those addresses ON, the HMI latches it ON, making it unable to be unlatched by the PLC.

You must make sure that PLC addresses %M200 to %M204 are deleted from the HMI and that the HMI no longer has any appearance of those addresses anywhere in its little old tiny brain. Also the new %M50 Reset relay must not be a button or used for anything else in the HMI, and the %M40 |P| rising edge one-shot must not be used ANYWHERE in the HMI or the PLC for any other purpose.

All the new HMI buttons must be set to only stay ON while the button is pressed. If they do not go OFF once your finger is removed, then the new program will not work.

If the above suggestions do not find the problem, then I do not know what the problem could be. Possibly the HMI-to-PLC communications could be slow enough to prevent the seal-in and unseal actions. I remember that topic being discussed here before, with a way around that problem, but do not remember the solution.
 
Last edited:
Hi Lancie, that's what I have what you are describing as correct. But still, I got the same problem. I checked everything in your last post.
If you don't have any other ideas, I will roll back to the previous version with the Maintained Contact and the Bit Resets for the HMI unused buttons.

Cheers.
 
Last edited:
I will roll back to the previous version with the Maintained Contact and the Bit Resets for the HMI unused buttons.
Did it work? As far as I know, the HMI will not let you reset a button that it has set as "maintained". It will keep sending a "1" for that button, no matter how many times you reset it in your PLC program. The only way to reset a maintained-contact button in the HMI is to reset the button (by physically pressing it or using a HMI reset button. Some HMIs do have separate reset bits for doing a remote PLC reset).
 
Last edited:
Hi Lancie, yes it worked fine with the bit reset. I had them on Maintained Contact for Rev.L. It causes the button the interrupt the horn and the previous selection for the newly pressed Horn Message selection. The lights stays on until the button is unselected by pressing on it once again.

I wanted to try your suggestion, it seemed more logical than mine for the reason you've given. Like you said its probably a timing thing between the Weintek HMI and the Sneider PLC.

Much appreciated,
I will post again the new revision in a while...

Alex

BitReset.jpg
 
I forgot to mention that my Button of the HMI for the Horn are set to TOGGLE, which is a kind of Maintained Contact different Set On/Set Off.
 
Are you all sure you read the OP subject line correctly"
I believe that "Morse Coding 'a horn in ladder'" would be:
" .- .... --- .-. -. .. -. .-... .- -.. -.. . .-."
 
I forgot to mention that my Button of the HMI for the Horn are set to TOGGLE, which is a kind of Maintained Contact different Set On/Set Off.
There is no way that your program could work with real "maintained-contact" HMI pushbuttons. I think that you must really be using a type of one-shot set on/set off pushbutton, where the button input goes away once you release it. Otherwise your program would not be able to reset the horn relays. Also, your version of the momentary-contact must have really used the set-on/set-off button also, otherwise the horn functions would not have stayed on.

Anyway, the important thing is that you got it working.
 
Hi Lancie, I confirm that the HMI button used on the Weintek is a Toggle configured in EasyBuilder. The other button options in EasyBuilder are Set ON, Set OFF, Momentary. The toggle is a Maintained Contact until pressed again, which leaves the lights of the button on the HMI ON until pressed again.

In the case of my program, its either pressed again (toggled) or if I press another button which call for a reset of all other button memory bits.

I did it twice in my program, one time for these Fog Horn and the other time for the Engineering Calling system.
 

Similar Topics

Hi all, may I ask anybody for help to write a program which translates text to morse code. I understand I have to divide text string to individual...
Replies
34
Views
7,230
Possibly a bit of an odd one for a PLC, but why not. I need to display morse code messages on a indicator lamp, but I also need to be able to...
Replies
11
Views
4,252
Hello, I was wondering if anyone has a ControlLogix block or routine for encoding and decoding base64. I figured I would ask before diving into...
Replies
1
Views
267
Hello All, I hope we are all doing great and have a healthy and happy 2023!! I was wondering if anyone could help me decode this Motor Name...
Replies
15
Views
5,309
I have a Mitsubishi FX2N-64MR-UA1 processor. The 1st analog output card is an FX2N-4DA. It requires 24VDC power. That card is obsolete. The card...
Replies
1
Views
1,580
Back
Top Bottom