S7 200 freq to analog to control VFD

rigicon

Member
Join Date
Aug 2009
Location
kent
Posts
415
Hi everyone,
I need a bit of help Please! I have a carousel with an encoder fitted. The A&B pulses go to the robot for line tracking. I have wired the C or rev pulse to a S7 200 PLC which has an Analog output module connected to the VFD that turns the carousel. I want to set a constant speed and then close the loop with the encoder to maintain the speed there is some chain slippage etc.

I thought I would use an interupt routine to see the C pulse and then start a timer to work out the period betwwen pulses which should give me the actual frequency and I can correct the setpoint frequency.

Sounds so simple in theory. I was wondering if anyone had done interrupts on a S7 200,I haven't yet and if anyone has done something similar with frequency.

The C pulse is adaquate as it is on the gearbox output so isn't very fast and the PLC will see the pulse, I might even get away without using an interrupt. Just trying to get as much ammo as possible before I tackle the job. Cheers in advance for any help.:D
 
Run a millisecond timer (T0, T32, T64 or T96)(max 32.767 seconds) outside the interrupt, use I0.0, I0.1, I0.2 or I0.3 as your interrupt input. Inside the interrupt MOVE the timer current value (signed integer) into a register and then reset the timer to zero. Use the stored value to adjust the machine speed. You might need to also learn about PID loops to control the speed. Also allow for the fact that the machine may be stopped, so if the timer reaches an obviously wrong value the reject the reading or stop the timer if the machine is stopped.

Bryan
 

Similar Topics

Hello, I have a question about an encoder that has absolute measurement. Specifically, it's the Lika SMA5, which I would like to connect...
Replies
2
Views
58
Hello, I have a question about an encoder that has absolute measurement. Specifically, it's the Lika SMA5, which I would like to connect...
Replies
0
Views
34
Hi. I have a 222 CPU. I need to recover the program from the eeprom memory. Is it possible?
Replies
1
Views
117
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
280
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
99
Back
Top Bottom