timer problem

PLCben79

Member
Join Date
May 2013
Location
Hemel Hempstead
Posts
7
hi, i am very new to plc programming so please bear with me.

i am currently writing a simple ladder program part of which detects the speed of a slow moving conveyor using the pulses from the rotary encoder as the input.

the program i have written counts the pulses on X0 over a 5 second period. and uses that info to work out the speed and store it in memory.

this speed is then used to work out the timing of a delay before activating an output to turn on a solenoid.

my problem is that when simulating the program it appears that the program waits for 5 seconds before following the next steps in the ladder.

this will create a problem for me as if the timing delay for activating the output and switching on the solenoid is less than 5 secs then the timing will be way off.

i could reduce the timer to less than 5 seconds however it doesnt really solve the problem.

is it possible to activate a timer and let it run while the PLC scans the rest of the ladder and then uses the information stored in memory on the next scan, and similarly i dont want the time delay for the activation of the output to impact the scan time of the program.

i am using an Mitsubishi FX1S PLC and GX Works 2, i am using the internal timer M8013 for 1 second timing to increment memory address d1 and then using the line >= d1 k5 to stop the timer and start M0 which does the mathmatics to work out the speed as I know that each pulse represents 150mm

any help much appreciated
 
Hello,

Can you post your code here? I am curious if you are using the SPD instruction. If not this may be something to look at. See section 5.6.7 in the programming manual. I tried to attach the manual but it is too big. You can download it from Mitsubishi's website it is manual # JY992D88101-D

Hope this helps,

Dave
 
dave the spd function is perfect for what i am trying to achieve.

furthermore plsy function on the next page is of further help for the output of my program

thank you
 
im still having a little trouble with the usage of SPD

the input from my encoder will be on X0

how do i drive the SPD function, initially I used X0 but i quickly saw this wouldn't work as all I was doing was turning the function on and off and no speed calculation would occur, I tried to use a Latched Aux Relay but the program wont compile so i must be doing it wrong.

i have attached a screenshot of what i have tried. The conveyor I am measuring is a relatively slow oven cook system so i have set the sample time to 2 secs.

i greatly appreciate your help
 
Hello,

Sorry I have been busy an d haven't had a chance to reply...I think you want to put an always on, (M8000 on the FX series), before your SPD command if the input driving it is X0. Otherwise with the sample you posted, you will be turning the rung to do the speed calculation on and off as the input is pulsed.

Hope this helps,

Dave
 

Similar Topics

i been at this for 2 days. The code for the traffic light works great. The problem is the programming of the crosswalk button. Im so close or so...
Replies
1
Views
1,291
Dear All, I have a problem with the Simatic Timer. I'm writing a program to check the pulse signal input, if the input signal is keep changing...
Replies
12
Views
2,837
Hello everyone, I am newer on Siemens PLC 1200. From HMI, I set timer value and place in MW20(120) like 120 second How to input MW20 to timer PV...
Replies
17
Views
3,563
I did not create the program but I have a weird countdown timer problem. it is user input, say it is set for 5 minutes; it will countdown to...
Replies
9
Views
4,449
Greeatings . I have some problem whit my maschine for plastic bags . I buy maschine but i didint know is it correct. When I turn on maschine i...
Replies
2
Views
1,358
Back
Top Bottom