Siemens S5 Help Needed

beethoven_ii

Lifetime Supporting Member
Join Date
Nov 2006
Location
Central England
Posts
409
Hello guys,

I'm conversant with Step 7 but a client wants to log cycle times on a machine which is controlled by an S5 plc. I have attached a screenshot of what I want to do in Step 7 and wonder if someone could give me some help on how to write the same thing in Step 5.

Any help would be greatly appreciated.

Regards,

Barry

S7 Sample.jpg
 
Here's the Step 7 code produced by the S5/S7 convertor:

Code:
FUNCTION FC 1 : VOID
  NAME: BERT
  BEGIN
  NETWORK
       AN  T 120;
       L   S5TIME#1s;
       SD  T 120;
       //;
       A   T 120;
       AN  I 5.2;
       JC  M001;
       JU  M002;
  M001:OPN DB 11;
       L   DBW 2;
       L   1;
       +I;
       T   DBW 2;
  M002:NOP 0;
       A   I 5.2;
       AN  M 10.0;
       JC  M003;
       JU  M004;
  M003:OPN DB 11;
       L   DBW 2;
       T   DBW 0;
  M004:NOP 0;
       AN  I 5.2;
       AN  M 10.1;
       JC  M005;
       JU  M006;
  M005:L   0;
       OPN DB 11;
       T   DBW 2;
  M006:A   I 5.2;
       =   M 10.0;
       =   M 10.1;
  
  
END_FUNCTION
 
Marker bits are addressed with F bits in the English version of Step5 and with M in the German version. Normally you can switch languages without problem if the different languages are installed.

Kind regards,
 
Could I ask one further question about the solution you posted please. In my sample S7 code I used M10.0 & M10.1 as oneshot pulses. In your solution it say AN F 10.0 Will this act as a oneshot or just an ordinary marker bit?
 
Thanks, I see it now but I think F10.0 should be true when I5.2 is high and F10.1 should be true when it is low. To do this I presume I'd have to delete the line = F10.1; and add a JU M007 and put M007:AN I5.2 = F 10.1?
 
Step7 code now tested in PLCSIM, code modified as follows:
Note use of M10.2

Code:
      AN    T    120
      L     S5T#1S
      SD    T    120
      =     M     10.2
//;
      A     M     10.2
      AN    I      5.2
      JC    M001
      JU    M002
M001: OPN   DB    11
      L     DBW    2
      L     1
      +I    
      T     DBW    2
M002: NOP   0
      A     I      5.2
      AN    M     10.0
      JC    M003
      JU    M004
M003: OPN   DB    11
      L     DBW    2
      T     DBW    0
M004: NOP   0
      AN    I      5.2
      AN    M     10.1
      JC    M005
      JU    M006
M005: L     0
      OPN   DB    11
      T     DBW    2
M006: A     I      5.2
      =     M     10.0
      AN    I      5.2
      =     M     10.1
 

Similar Topics

Hi I’m after some help , I have a plc program with a baumer verisens vision camera attached I have got the signals working ect but I have an...
Replies
9
Views
958
I have a siemens 317-2 and an old GOT1000 (GT1675M - V) I am trying to get the darn things communication and having no luck. I have followed the...
Replies
12
Views
2,179
I need help from anyone with access to run a test on a 414H, 416H or 417H PLC system. The purpose of the test is to measure the communication...
Replies
0
Views
1,305
Hi Guys, I have a Siemens HMI that hangs. It is ESA XB300BF4R070 running on Operating System XWIN7P01EN1 customized windows7 Pro 32-bits...
Replies
1
Views
1,354
Hi guys I have an existing program on a tia 1500 plc which has an IP address of 172.16.23.### which is ok and a gateway of 172.16.22.01 But our...
Replies
8
Views
2,086
Back
Top Bottom