Posted 25 Jan 2006 I,m just a novice in programming. I like to write a program to track a couple of signals from a machine. When the machine is running green lamp is on and when it is not, red lamp is on. I like to track these 2 lamps by writing a program to keep them tracked in a plc (micrologix 1000). I don't want any DDE or OPC, just hook up my lap to and check how long the machine's be stopped or running and then unhook it and check again whenever I want. Just like histogram. Like writing a histogram program without having a PC on line to check them. Share this post Link to post Share on other sites
Posted 25 Jan 2006 Here's one possiblility: Set up a 1 minute retentive timer (RTO), use the done bit of the timer to index a counter with a preset of 60 (minutes counter), then have the done bit of the minutes counter index an hour counter. If needed you could also add a "days" counter. You will need a cascade for each bit that you want to track. Share this post Link to post Share on other sites
Posted 25 Jan 2006 You won't be able to create a histogram from total time accumulated. Histograms track the inputs over time. I dont' know what you need this for, but just keep that in mind Share this post Link to post Share on other sites
Posted 26 Jan 2006 Can I us shift register to keep the events? Let's say machine's down for 10minutes, kepp that 10 minutes in shift register and next down time for 5minutes and so on? If so how do I do the shift register? Share this post Link to post Share on other sites
Posted 1 Feb 2006 you can use shift registers (see help for BSL instruction) and any number of other ways but what exactly you want to achive? just to find ratio run time vs. down time or time or to see graphically how often machine was stopped or...? Maybe this would help. I used all 0-255 registers of N100 for tracking. Bit B3:0/0 was used as input (on when machine is running). You can change timer preset to make it go faster or slower... Share this post Link to post Share on other sites
Posted 2 Feb 2006 Thanks. How do you attach image like this? How Can I save Rslogix in pfd? Share this post Link to post Share on other sites
Posted 2 Feb 2006 - you reduce window size if possible, - create screenshot by pressing PrtScreen or Alt+PrtScreen (first one takes whole screen, later one only does window in focus) - paste it into some software that can save it as picture (I use Irfanview) - create post and attach the image as for PDF, get virtual printer drivers ( free one is colled PDF995 or something like that...). once you install it, it shows up like another printer. when you print to this 'printer', there is no paper involved, result is PDF file. it works with every application. Share this post Link to post Share on other sites