Step 7 programming Tip

Manoj M

Member
Join Date
Feb 2014
Location
London
Posts
59
Good Day Experts,
I have a small problem in programming which I would like to discuss. I am using an AC drive of different manufacturer with CPU315-2PN/DP over the profinet. There are some read/write tables from/to drive for its functioning. PLC is receiving one of the fault table from drive which is having some number depending upon the fault in the drive. 0 for no fault, 1 for under voltage, 2 for over current and etc.etc. Now I am looking for the easiest way to configure this. I want to create a DB in which first bit corresponds to code 0, second bit corresponds to code 1 and so on. I can do in ladder by comparing the code number to a value and then connect to the particular bit of the DB. I have 45 different faults configured in the drive and that looks the lengthy way of doing it.
Has anyone got the better suggestion of doing this.

Regards
Manoj
 
indirect bit addressing, No real PLC at handy, but something like this with STL code

L MW10 // Fault code
L P#0.0 // Not necessary??, Pointer offset
+D // add (now we check bit status, so no SLD3)
T MD2 //transfer fault number to pointer value (double word)
L 0
L MW10
>=I
O
L45
L MW10
<=I
= M[MD2] / set bit M0.0..M5.4 indirectly if fault between 0..45


ex. MW0 is 0 -> pointer 0+0 =0, bit M0.0 is set
MW=1 -> bit M0.1 is set
MW45 -> bit 45/8 = bit M5.5 is set


Or??

L MW10 // load fault code
LAR1 // Load AR1 (fault code at AR1)
T M[AR1, P#0.0] //transfer with offset to Mx.x bit





http://www.plcdev.com/siemens_s7_indirect_addressing
http://www.plctalk.net/qanda/showthread.php?t=3184
 
Last edited:
Just a thought,

If the purpose of this is to display the appropriate fault mesage then this can normally be done using a textlist indexed by the fault code.

Nick
 
Thanks Nick for your suggestion. I never thought of using Text list and now it turned out to be the easiest option... Thanks again. Really appreciate it....
 
Also many thanks to Lare and L D [AR2, P#0.0]. I think the option suggested by Nick is the way forward.

Regards
Manoj
 

Similar Topics

Hi, I have a 315-2 PN/DP CPU. It was programmed in Step 7 V5.5. Then a colleague programmed it in TIA Portal V13 for a test. Now I want to...
Replies
6
Views
2,273
Hi, I am programming a blow moulding machine with 2 stations. So far I have the sequence done with function STEP ( and SNXT). How can I jump...
Replies
1
Views
1,583
I need material for programming step 5 Plc SIEMENS?
Replies
3
Views
1,592
DEAR FRIENDS, I WANT TO KNOW THAT WHAT IS THE USE OF S100 BIT IN DELTA PLC PROGRAMMING. CAN ANYBODY GIVE ME ANSWER. THANK YOU :nerves:
Replies
2
Views
2,292
Back
Top Bottom