Convert simple ab logic to siemens microwin

sparcks

Member
Join Date
Aug 2016
Location
uk
Posts
14
Hi just trying out some alarming logic to work with siemens microwin s7-200 can anyone help me convert this simple ab logic to siemens microwin.
struggling with pointers ....

Thanks




LANE 1
IS LOW +--- MOV -+
----+----| |-------| 1 |
| | N7:51 |
| LANE 1 +---------+
| IS LOW +--- MOV -+
+----|/|-------| 0 |
| N7:51 |
+---------+

LANE 2
IS LOW +--- MOV -+
----+----| |-------| 2 |
| | N7:52 |
| LANE 2 +---------+
| IS LOW +--- MOV -+
+----|/|-------| 0 |
| N7:52 |
+---------+

LANE 3
IS LOW +--- MOV -+
----+----| |-------| 3 |
| | N7:52 |
| LANE 3 +---------+
| IS LOW +--- MOV -+
+----|/|-------| 0 |
| N7:52 |
+---------+

MOVE THE POINTED TO REGISTER INTO THE MESSAGE REGISTER (N7:40)

CURRENT
MESSAGE
+--- NEQ -----+ +--- MOV ------+
---| N7:[N7:50] |-------| N7:[N7:50] |
| 0 | | N7:40 |
+-------------+ +--------------+


MESSAGE TIMER. NOTE THAT THE INDEXED MESSAGE IS CHECKED.

MESSAGE
TIMER
+--- NEQ -----+ T4:10/DN +--- TON -+
---| N7:[N7:50] |------|/|------| T4:10 |
| 0 | | 5 SEC |
+-------------+ +---------+


INCREMENT THE POINTER

CURRENT
MESSAGE POINTER
+--- EQU -----| +---- ADD -+
---+---| N7:[N7:50] |---+---| N7:50 |
| | 0 | | | 1 |
| +-------------+ | | N7:50 |
| | +----------+
| MESSAGE TIMER |
| T4:10/DN |
+--------| |----------+



IF POINTER IS BELOW THE BEGINNING OF THE RANGE,
OR WHEN THE POINTER GETS TO THE END, RESET IT
TO THE BEGINNING OF THE RANGE (THIS ENSURES THAT
WE NEVER GO ABOVE OR BELOW THE RANGE OF 41 TO 45)


POINTER POINTER
+--- GEQ -+ +---- MOV -+
---+---| N7:50 |---+---| 41 |
| | 44 | | | N7:50 |
| +---------+ | +----------+
| |
| +--- LEQ -+ |
+---| N7:50 |---+
| 40 |
+---------+


IF THERE ARE NO ERRORS, CLEAR THE MESSAGE

LANE 1 LANE 2 LANE 3
IS LOW IS LOW IS LOW +--- MOV -+
---|/|-----|/|-----|/|-----| 0 |
| N7:40 |
+---------+


 
Just tryin to learn pointers and see it working with the s7200 and want to see it it working in this application

Thanks
 
According link:
https://support.industry.siemens.co...ect-addressing-for-the-s7-200-?dti=0&lc=en-WW


It would be something like this (I don't have siemens 200, so there can be little errors)



LANE 1
IS LOW +--- MOV -+
----+----| |-------| 1 |
| | VB201 |
| LANE 1 +---------+
| IS LOW +--- MOV -+
+----|/|-------| 0 |
| VB201 |
+---------+

LANE 2
IS LOW +--- MOV -+
----+----| |-------| 2 |
| | VB202 |
| LANE 2 +---------+
| IS LOW +--- MOV -+
+----|/|-------| 0 |
| VB202 |
+---------+

LANE 3
IS LOW +--- MOV -+
----+----| |-------| 3 |
| | VB203|
| LANE 3 +---------+
| IS LOW +--- MOV -+
+----|/|-------| 0 |
| VB203 |
+---------+



pointer address to AC1 (201..203)


+--MOV_DW-+
+-------------|EN |
VB200-|IN out|-AC1
+---------+







MOVE THE POINTED TO REGISTER INTO THE MESSAGE REGISTER VB210



+---BLKMOV_B---+
----------------| EN |
*AC1-| IN out |-VB210
4-| N |
+--------------+




MESSAGE TIMER. ALARM ON -> ALARM IS SHOWED 5seconds.

MESSAGE
TIMER
+--- NEQ -----+ T0 +--- TON -+
---| *AC1 |------|/|------| T0 |
| 0 | | 5 SEC |
+-------------+ +---------+


INCREMENT THE POINTER

CURRENT
MESSAGE POINTER
+--- EQU -----| +---- ADD -+
---+---| *AC1 |---+---| VB200 |
| | 0 | | | 1 |
| +-------------+ | | VB200 |
| | +----------+
| MESSAGE TIMER |
| T0 |
+--------| |----------+



IF POINTER IS BELOW THE BEGINNING OF THE RANGE,
OR WHEN THE POINTER GETS TO THE END, RESET IT
TO THE BEGINNING OF THE RANGE (THIS ENSURES THAT
WE NEVER GO ABOVE OR BELOW THE RANGE OF 201 TO 203)

POINTER POINTER
+--- GEQ -+ +---- MOV -+
---+---| VB200 |---+---| 201 |
| | 201 | | | VB200 |
| +---------+ | +----------+
| |
| +--- LEQ -+ |
+---| VB200 |---+
| 203 |
+---------+


IF THERE ARE NO ERRORS, CLEAR THE MESSAGE

LANE 1 LANE 2 LANE 3
IS LOW IS LOW IS LOW +--- MOV -+
---|/|-----|/|-----|/|-----| 0 |
| VB210 |
+---------+


 

Similar Topics

I'm new in this forum. Currently, i have one sensor with power supply DC24V (NPN output). But the PLC i using only allow PNP input. At the same...
Replies
5
Views
21,586
I am trying to convert this simple ladder diagram (for Omron Symatic 200) into Pascal, C or Basic. I want to use a PICmicro instead of PLC, but I...
Replies
3
Views
5,867
Hello all, I'm currently working on a servo motor linear positioning system (ball screw). I'm all set up regarding communication between my HMI...
Replies
1
Views
92
I have an application using an incremental encoder and then I convert it to degree (0-360) using calculation program. For a while, the calculation...
Replies
8
Views
274
Hi all. Me again still learning Rockwell. So I'll be polling an INT data array from a Modbus SE power meter with a L82 (with a Modbus ProSoft in...
Replies
56
Views
1,386
Back
Top Bottom