teal854t
Jan 24 2006, 11:05 PM
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.
Ken Moore
Jan 25 2006, 05:45 AM
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.
Wordman
Jan 25 2006, 11:04 AM
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
teal854t
Jan 25 2006, 07:20 PM
QUOTE(Ken Moore @ Jan 25 2006, 05:45 AM) [snapback]27356[/snapback]
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.
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?
panic mode
Feb 1 2006, 10:06 AM
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...
teal854t
Feb 2 2006, 02:54 AM
QUOTE(panic mode @ Feb 1 2006, 10:06 AM) [snapback]27781[/snapback]
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...
Thanks. How do you attach image like this? How Can I save Rslogix in pfd?
panic mode
Feb 2 2006, 08:17 AM
- 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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.