Semaphore/mutex RSLogix500

InDaTeez

Member
Join Date
Jun 2017
Location
Roma
Posts
3
Hello everyone i'm a senior in computer engineering from Rome,Italy.

I have to make a simple PLC project that involves coding an electromagnetic bridge crane in Ladder (using RSLogix500) and then i have to simulate it in Visual Basic 6.

I have to code two bridge crane (left and right) that must be able to move two objects from two different platforms (left and right) to a shared big platform in the middle.

I already coded the movement of the left bridge crane (i'm assuming i might be able to use the same exact code to move the right one(?)).

The problem is that i have no idea how to code in RSLogix a semaphore/mutex that allows the two cranes to reach the shared resource (with the shared resource being the big platform in the middle).

How do i connect the two cranes using this semaphore/mutex? do i have to copy paste the code for the left crane or can the two cranes share the same code?

I apologize for my english, tried my best, please if you can keep it very simple so that i can understand better what i'm supposed to do since i'm ABSOLUTELY new to the software RSLogix500.

If needed i can provide the code made up to this point, have a good day!
 
Welcome to the Forum!

While theoretically you could use the same code in two different CPUs each driving its 'own' crane, in the real world, you will need some sort of 'collaboration' logic implementation between the two controllers in order to avoid interference/collision.

Each crane will need to share its position with the other one; this will require a Produce/Consume position data exchange between the two PLCs as to 'restrict' the movement into the common platform area of one crane if the other one is not completely clear of said platform position, or generally, if the difference between the two cranes' positions is lower than the required clearance; this logic will need to be 'doubled up' by each crane's collision sensors state data exchange which will restrict both cranes' movement if changing 'normal' operating states; this would be a safety redundancy.

In conclusion, most of the logic could be identical except for the 'movement into the other's direction' required conditions/permissives.
 
Last edited:
Thank you very much dmargineau for your time, i have a couple of questions:

1) since the process it's supposed to be completely automated (by pressing a start button the first crane will pick up the object put it on the platform go back to his standby location then the second crane will do the same without having to CONTROL in any other way the entire process) will i be able to use a single PLC?

2)with that being said do you have any suggestion on how to implement the data exchange between the two cranes? right now i have coded just the movement for a generic crane and i'm kinda stuck on how to develop the code, sadly the teacher gave us this project without explaining anything but the most basic feature of the software.

thank you a lot!!
 
Last edited:
1) From a logic application perspective, using only one PLC will be more efficient since the critical data (cranes' positions and collision sensors' states) will not need to be exchanged between two controllers; however, you will need to differentiate between the two cranes' dedicated IO and tags in your single application (no Copy/Paste) and the real world implementation will be quite expensive and failure prone; you will need extensive IO and/or communication festoon cabling from each crane to the PLC location; usually, the crane PLC travels with the crane.

2) If using only one PLC no data transfer is required; both cranes' absolute position encoders data and the collision sensors IO data will be located within the one system (PLC CPU).

For automatic operation, limit the travel of each crane between its own loading platform and the common unloading platform positions; I would also deny movement towards the center of the building for each crane if the other one is already travelling the opposite direction (towards the unloading platform); you might want to add Manual Mode 'End of Rails/Building Limits' for each crane travel, again, supplemented by the collision sensors backup logic.
 
As for the real world implementation i do understand your point however i am just making a virtual simulation and luckily i'm don't have to worry about any problem that might come up in a real world scenario.
Thank you for your precious tips i will try my best to make it work, if i get stuck i'll come back here ahah, have a nice day!!
 
Also, even this is school homework, don't forget to add Manual Mode controls and especially homing sequences for both cranes; 'Home' could be the loading platform position for each bridge or a pair of rail position sensors (write the absolute position within the encoder buffer after the homing sequence had been completed).
 

Similar Topics

I have some code i need to block until a super genie for data entry has completed (by operator input)as per below. FUNCTION New_Setpoint()...
Replies
5
Views
2,274
Hi ! I got this example of semaphore, it works. But now i want something more complicated. Using a timer. The LED Q0.2 is turn on (2 seconds)...
Replies
10
Views
4,809
So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
538
Hello, I'm new to programming. I'm using RSLogix500 to modify an existing program for a SLC500. My plan was to use one of the existing inputs...
Replies
26
Views
1,983
So i have an allen bradley rack (2080-LC50-24QWB), i have it connected through ethernet. I dont have an offline program so im trying to upload...
Replies
6
Views
677
Back
Top Bottom