Submit a ticket at our help desk. Our Support team will find the answer to all your questions.
See our Knowledge base, before you post a ticket - perhaps you'll find the solution to your problem faster.
Libstock is a community website created by mikroElektronika, that allows users to share their projects and libraries. It’s created with aim to provide the community with the right and neccessary infrastructure for this.
This is the place for all your additional questions and suggestions. Our team is ready for all your questions. We will handle everything in a timely manner. Feel free to send your request using the form on the web page.
Use our latest embedded development solutions to experience the rapid prototyping on a whole new level. We bring you the most complete, most innovative, and most reliable development toolchain in the industry, giving you an edge over the competition, greatly reducing the time to market.
Learn more about our rapid development toolchain. A huge number of articles and examples that might inspire you or give you a kickstart. A huge knowledge base will provide you with the guidance you need.
Many practical examples and demonstration applications that you can use as a starting point or reference for your own custom design. Each post offers guidance and explanations not only about the project but also about the used technology.
We are dealing with a simple system that can control 100 car at the maximum. Each time a car enters, PLC automatically adds it to a total sum of other cars found in the garage. Each car that comes out will automatically be taken off. When 100 cars park, a signal will turn on signalizing that a garage is full and notifying other drivers not to enter because there is no space available.Signal from a sensor at the garage entrance sets bit IR200.00. This bit is a condition for execution of the following two instructions in a program. First instruction resets carry bit CY (it is always done before some other calculation that would influence it), and the other instruction adds one to a number of cars in word HR00, and a sum total is again stored in HR00. HR memory space is selected for storing a total number of cars because this keeps the status even after supply stops. Symbol "#" in addition and subtraction instructions defines decimal constant that is being added or subtracted from a number of cars already in the garage. Condition for executing comparison instruction CPM is always executed because bit SR253.13 is always set; this practically means that comparison will be done in each cycle regardless whether car has entered or left the garage.Signal lamp for "garage full" is connected to an output IR010.00. Working of the lamp is controlled by EQ (equal) flag at address SR255.06 and GR (greater than) flag at address SR255.05. Both bits are in OR connection with an output IR010.00 where the signal lamp is. This way lamp will emit light when a number of cars is greater than or equal to 100. Number of cars in a real setting can really be greater than 100 because some untrusting driver may decide to check whether there is any space left, and so a current number of cars can increase from a 100 to 101. When he leaves the garage, a number of cars goes down to 100 which is how many parking spots there are in fact.Ladder diagram: