S7 Speed Control blk

Matchu04

Lifetime Supporting Member
Join Date
Mar 2013
Location
Northampton
Posts
287
Hi Guys back again..

I am wondering if some of you guys could help me understand the actual process of this block I believe I understand how it operates but the logic at the end seems to be what I expect..

Let me paint the picture.

What we have got is two machines that in essenince the same machine. One de-stacks a pallet of keys (Deunitiser) and the other stacks them back up once they have been washed filled and checked (Unitiser).

The hoist on the Uni seemed to be not as smooth as the deUni and the two pics of the blocks I have attached are for the speed control for the hoist. As you can see the Uni has had its valves changed to 0.

Hardware wise the PLC is used to create a 4 bit binary output with is feed to a 0-10v D-A module (seperate from PLC) then that analog signal to the drive.. Simple

My issue comes with understanding the numbers within the code. So in the mid section of the code there are a few conditons that determine which jump condition to execute so changing the binary output thus the 0-10v input to the dive but this is where I dont feel confident..

So the binary outputs are

M004 (240 Ored with 15 = 255 dec or 1111 1111) ie 100% or 10V
M002 (240 Ored with 2 = 242 dec or 1111 0010) ie 10% or 2 V
M003 (240 Ored with 6 = 246 dec or 1111 0110) ie 50ish% or 5V
M004 (240 Ored with 4 = 244 dec or 1111 0100) ie 20ish% or 4V
M005 (240 Ored with 1 = 241 dec or 1111 0001) ie 0% 0V

Is this correct?

Another question I would like to ask is the and word at the begining of the code, is that in effect limiting the valve of output byte to a max of 240??


Any guidence would be greatly appreciated...

Unitiser.jpg DeUnitiser.jpg
 
Just an idea not solution

I not so familiar with STL, the below program I done in Ladder Diagram then I convert to STL,i have run it in simulator.

You’re need to give any valuable info to us to help you.

any simple drawing,step ,info on your D-A converter ,may helping you to solve your problem.

I only give an idea,

perhaps other member can give better answer.

Others things you need to take care the converter that you use, any change on the bit will effect to analog output

If I not mistake at less 1 bit must ‘ON’ to give analog output during running time to prevent voltage become 0 Volt.
Probably the bit 1. Due switching delay .


A "RUN"
AN "POS_1"
AN "POS_2"
AN "POS_3"
AN M 1.0
AN "REVERSE"
FP #FULL
JNB _001
L W#16#000F //FIRST RUN FULL SPEED UNTIL POSITION-1
T QB 0
_001: NOP 0
A "RUN"
A "POS_1"
JNB _002
L W#16#0001 // POSITION-1 WITH SPEED-1 change if require.
T QB 0
_002: NOP 0
A "RUN"
A "POS_2"
JNB _003
L W#16#0003 // POSITION-2 WITH SPEED-2 change if require
T QB 0
_003: NOP 0
A "RUN"
A "POS_3"
JNB _004
L W#16#0000 // POSITION-3 WITH SPEED-3 change if require
T QB 0
_004: NOP 0
A "RUN"
A "POS_1"
S M 1.0
AN "RUN"
R M 1.0
A M 1.0
= M 1.1
A "RUN"
A "REVERSE"
A "POS_3"
JNB _005
L W#16#0009 // REVERSE WITH SPEED-1 change if require
T QB 0
_005: NOP 0
A "RUN"
A "REVERSE"
A "POS_2"
JNB _006
L W#16#0003 // REVERSE WITH SPEED-2 change if require
T QB 0
_006: NOP 0
A "RUN"
A "REVERSE"
A "POS_1"
JNB _007
L W#16#0001 // REVERSE WITH SPEED-3 change if require
T QB 0
_007: NOP 0
AN "RUN"
JNB _008
L W#16#0000 // SPEED STOP/RESET VALUE
T QB 0
_008: NOP 0
A "RUN"
A "REVERSE"
= "SymQ0.4"
 
Another question I would like to ask is the and word at the begining of the code, is that in effect limiting the valve of output byte to a max of 240??

No. The orignal programmer used decimal (240) to form a bit mask, it would have been clearer to have used W#16#F0 instead. The code is generating a bit pattern in the lower 4 bits of QB23 whilst not modifying the upper 4 bits

e.g.
Code:
      L     QB    23
      AW    W#16#F0            //lower 4 bits of QB23=0
..
.. processing
..
      OW 
      T     QB    23

The upper 4 bits are irrelevant and the output voltage is determined by the lower 4 bits

0000=0/15 of max
0001=1/15 of max
0010=2/15 of max
...
...
1111=15/15 of max
 

Similar Topics

Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
843
Does anyone have any experience with working on piezoelectric motor control? I want to use off the shelf components to hopefully change the...
Replies
5
Views
713
I have two drives that control two seperate pumps that need to control pressure for plant cleaning. The company wants one pump to be running and...
Replies
4
Views
674
Hi, I've bought this PLC + HMI from Aliexpress, the one on the right that uses SSRs. and want to connect a 24V/0.2A DC fan to the output. My...
Replies
32
Views
6,944
Hey everyone! I'm searching for an example demonstrating how to program in Studio 5000 speed control of a PowerFlex 525 drive via Ethernet. While...
Replies
1
Views
639
Back
Top Bottom