neil76 Posted June 13, 2020 Report Share Posted June 13, 2020 Hello everyone I would like some help/advice on how to program my ladder logic for a project I am about to start. I purchased a Samba7" yesterday as this looked like the ideal model to start off with. I have created a maintenance screen for various items on our machine tool, I would like the system to notified me when it reaches certain hours, some items on the machine only require maintenance at 2000 hours. I need to take an input from the machine when the pump starts to run this would be via a 24V output from the machine. I then need this to start the timers running. any advice on how to program this logic would be greatly received. Many thanks in advance Neil Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted June 13, 2020 MVP 2022 Report Share Posted June 13, 2020 The way I do this is to use SB 13 to increment an integer operand (probably ML or DW), then divide the result by 360. This gives you operating hours to the tenth of an hour. Quote Link to comment Share on other sites More sharing options...
neil76 Posted June 13, 2020 Author Report Share Posted June 13, 2020 Good Evening Flex Thank you for the swift reply, this makes sense I was looking for a hour counter in the timers function. I'm looking forward to learning this system and I'm sure you will be hearing from me in the not to distant future. have a great weekend. thanks Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted June 13, 2020 MVP 2022 Report Share Posted June 13, 2020 Hi Neil, although your Net 8 may work, it is not the best practice way of doing it. We often say on the forum that Unitronics does not charge for rungs/nets/whatever you want to call them. Break up all your MB 41, 42, 43, into separate ones etc. You could do every action needed for each of the bits in one rung instead. One way to do this is below. There would also be another net(s) to reset the counts, linked to a particular screen and button push that would reset the count to 0 and also reset MB40 etc. cheers, Aus Quote Link to comment Share on other sites More sharing options...
neil76 Posted June 14, 2020 Author Report Share Posted June 14, 2020 Good Morning Aus thank you for the advice, I will give this a try. I presume I will require a separate counter for every item that would be in my final programme this would be around 30. Many thanks in advance. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted June 14, 2020 MVP 2022 Report Share Posted June 14, 2020 Unless the pumps run constantly, you will need a contact at the beginning of ladder rung 4 in Ausman's example to allow ML 4 to only increment when the pump is running. 47 minutes ago, neil76 said: I presume I will require a separate counter for every item that would be in my final programme this would be around 30. Yes, unless all items always run together at the same time. Quote Link to comment Share on other sites More sharing options...
neil76 Posted June 14, 2020 Author Report Share Posted June 14, 2020 Good morning/afternoon Flex you read my mind, the pump doesn't run all the time I do only require the counters to activate when I get a 24V input from my machine controller. I can write the code for every line as Aus made a good point Unitronics doesn't charge for each rung. Many thanks in advance. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted June 14, 2020 MVP 2022 Report Share Posted June 14, 2020 Yep, I only drew up a quick example and it runs all the time.......! One other thing Neil, "only require the counters to activate when I get a 24V input" I often harp on having inputs relate to the desired result of an output. All too often I see output/input relationships NOT relate to the actual desired result occurring. The input simply monitors some component in the supply chain downstream of the output, which doesn't work if there is a failure further down the line. If at all possible, monitor the final result of the output.....which you may already be doing. cheers, Aus Quote Link to comment Share on other sites More sharing options...
neil76 Posted June 15, 2020 Author Report Share Posted June 15, 2020 Good Morning Aus Thank you for the information, the sample you did was great. I was planning on taking +24V input from our machine controller interface and connecting to I10 or I11 to initiate the counter on the samba system, is this possible. Many thanks in advance Cheers Neil Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted June 15, 2020 MVP 2022 Report Share Posted June 15, 2020 I'm assuming the +24 input you mention is linked somehow to the output that controls your "plungers". What I was getting at is that you should always try to monitor the very final result of the output turning on. If the input comes from a gizmo that measures an actual flow from your plunger that's great, but if it simply turns on by perhaps using an auxiliary contact on a contactor then that isn't a guarantee that the action is happening. All that is monitoring is that one switch in the process has turned on, which doesn't necessarily mean the plunger is going. cheers, Aus Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted June 15, 2020 MVP 2022 Report Share Posted June 15, 2020 As far as I understand the author of the topic - he was going to create a system that collects data on the operating time of the plungers. He does not need to control them - but only count the time of the on state. To do this, he was going to connect the output signals of the existing in the system controller to the inputs of the samba PLC. If so, then his actions are clear and correct. Accordingly, Ausman emphasizes that if the Samba PLC controls the process - then the connection of its own inputs to its own outputs is redundant and can be replaced by a simple program reading of the state of the outputs. That is, the 1-st question to the author, what he wants to do: - only to record operating time and to inform when service is necessary; - manage the installation and record the operating time and notify when maintenance is required; - add to the system options that were not implemented by the existing controller; -other option ....? Second - if present controler used for control plunger - what controller used? What type of output connection used- PNP, NPN, DESCREAT, PWM, ANALOG? 3-rd - Why I10, I11 used? This information needed for understand which solution is most suitable for his system 12 hours ago, neil76 said: I was planning on taking +24V input from our machine controller interface and connecting to I10 or I11 to initiate the counter on the samba system, is this possible. Quote Link to comment Share on other sites More sharing options...
neil76 Posted June 16, 2020 Author Report Share Posted June 16, 2020 Good Morning All Thank you for the response. At the moment I would just like to monitor the running time of the machine so that the maintenance team can replace any components that are due. If possible flag up a warning message on the screen to notify them. I would like to add other things to this system in the future but ill just take one step at a time wile I familiarize myself with it. I can use any input on the system as all are available at the moment. The plunger is just attached to a pump unit so there is no controller for this other than when the pump is commanded to run from the machine controller. Many thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.