Sign in to follow this  
Followers 0
phil.s

Programming help

8 posts in this topic

Hi Looking for some advice if possible : I've got a mitsi PLC (FX1N) and I'm monitoring how many pulses I get on an input over a minute. If I get more pulses during the minute I need to reduce a timer and if i get less pulses I need to add more time to it. The amount of time I add or subtract should be perfectly linear. Is there an instruction that could do all of this for me?? Thanks

Share this post


Link to post
Share on other sites
just one instruction to solve all of this? that would be "read the manual".... you do have one don't you? did you see PLC instruction SPD (FNC56)? copy of manual should be in our download section.

Share this post


Link to post
Share on other sites
Thanks. Got to that conclusion myself really just looking for some 'real life' help!

Share this post


Link to post
Share on other sites
You should try explaing problem a bit better. If i understand the question there will be three steps to the solution: SPD instruction should do most of it but still not quite complete. And you will need to scale result to update timer preset (just linear conversion). Also timer will need to use register to hold preset instead of hardcoded value. I guess you are trying to measure RPM but 60sec update time could be slow. Do you wan't to wait 60 seconds to see change? Maybe 0.6 seconds is more attractive. Also depending on frequency of pulses (if they are too slow) even 60sec could be too short. Why don't you explain what exactly you want to achive and what is you current approach. It is easier to work if one know direction than to guess problem and develop solution based on guess. I'm confused about timer change. is this supposed to estimate stopping time based on speed of conveyor or something?

Share this post


Link to post
Share on other sites
I get a pulse from a conveyor to my PLC. This tells me when my machine can open some trap doors and load product onto the conveyor. The signal is always in the same place but the conveyor speed will vary. When the conveyor speed is at its fastest my trap doors open as soon as I get the signal. When the conveyor speed runs slower, I have to delay when my trap doors open. If the fastest speed requires 0 delay and the slowest say 1 second the speeds in between are directly proportional. The maximum number of pulses I get could be 50 a minute. The lowest number is 10. Like you say I think a minute is too slow to sample over as the recovery time would be too long. Another way I can measure the speed is to actually measure the time between pulses. The measuring is easy, its the converting that into some sort of gain that affects the timer. I was really hoping there would be a couple of instructions that would do this rather than trying to write out the whole process. So far though I can't seem to think of which intructions could be used. I dont think the SPD one will work. Edited by phil.s

Share this post


Link to post
Share on other sites
I agree, measuring time between pulses will provide much faster update time. if this is still not good enough, getting feedback with more pulses would do the job. time between pulses is period, frequency can be calculated f=1/T or RPM=60/T then you should be able to use SPD etc. as discussed. because we get 10...50 pulses per minute, time between pulses will be 1.2...6 seconds (60/10=6...60/50=1.20) if you use standard 0.1s base timer, you would get 12..60 in accumulator. since all of this is still 16-bit integer, you might want to use diferent scale to get reasonable values out. for example, instead of f=1/T, you could use f=1000/T

Share this post


Link to post
Share on other sites
Thanks for the help. I ahve got it sorted. Thanks again :)

Share this post


Link to post
Share on other sites
excellent...

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