Sign in to follow this  
Followers 0
PlasticsDude

Micro 430: timing an event

4 posts in this topic

I am trying to come up to speed on the Micro 830 and to be honest PLC's in general. The first program I need to write (after many years of not working with PLC's at all) is some simple timing code. I need to time how long an input is high (it is held high for 1/60th to 60/60ths of a second), put this into memory, and make an array that I can look at with my laptop. Should this be a relatively easy program for a beginner? At first, I want to just connect a momentary to one of the inputs and time how long I hold the switch closed with my hand and see if I can do that, before I connect to the actual device that I will bee timing. Edited by PlasticsDude

Share this post


Link to post
Share on other sites
A program to do that should be fairly simple, however you will need to make sure that the scan time and input speed of the PLC can handle the speed of the input. You're talking better than 17ms divisions. Newer PLCs generally have 1ms resolution timers. I've not heard of the Micro 430. What brand is it? If it's older, it may have courser resolution timers (10ms, 100ms) that would be less accurate. Also, many input cards have 10ms filters on them, but these can often be adjusted, or you can use high-speed inputs.

Share this post


Link to post
Share on other sites
The 430 is a relatively new arrival from AB. EDIT: It's the Micro 830. Edited by PlasticsDude

Share this post


Link to post
Share on other sites
There it is. First I've heard of it. Since it's new, scan time shouldn't be an issue, but you'll want to double check that. Also look at the specs for your input modules to see if there's a minimum reaction time on the inputs. Finally, look to see if there's a 1ms resolution timer available. Assuming all of the above is good, then you're ready to go. When you're timed input is on, drive a timer AND move the accumulated value of the timer into a data register. When the input is off, the timer will reset, but the accumulated value will be stored in the data register and you can move it to your array. There are different ways to do this depending on how you want to store the data, but I'd probably use some sort of shift array so that you are always moving the new data into the top of the array and shifting old data over to make room. If you were using any of the other AB products, I could be more specific, but I haven't used that one!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0