Problems with Step 7 v5.5 on Windows 7 ?

BNA

Member
Join Date
Sep 2003
Location
Give
Posts
117
Hi'

Does anyone of you expirence any problems running Step7 under windows 7 ?

In the last couple of weeks I have had some wierd problems with Fb's which I have been using for several years, Fb's which have worked without any problems are suddenly not working any more, and yes I am sure that I am not making any programming error's.

The biggest problems are in FB's created in SCL ! For example a blok tested on the simulator and running perfectly on 2 other systems, however on my new laptop with windows 7 it only works sometimes.

I have contacted Siemens Support and they haven't registret any known problems.

Regards
Brian
 
Can you be more specific about the failure mode of the FB in PLCSIM ? (I'm not using W7 yet but it is on the horizon...)
 
Can you be more specific about the failure mode of the FB in PLCSIM ? (I'm not using W7 yet but it is on the horizon...)

The failure only appers when I download to a "real" Plc I haven't seen it in the Simulator yet, for example an egdedetection I have been using for some time now, starts generating pulses when the input is set high.

/Brian
 
The failure only appers when I download to a "real" Plc I haven't seen it in the Simulator yet, for example an egdedetection I have been using for some time now, starts generating pulses when the input is set high.

/Brian

Code?
 

In the last couple of weeks I have had some wierd problems with Fb's which I have been using for several years, Fb's which have worked without any problems are suddenly not working any more


I'm not going to upload all my Fb's, I know they are working ! The question was if any one is having problems with Step7 running under Win 7.

Regards
Brian
 
I'm not going to upload all my Fb's, I know they are working ! The question was if any one is having problems with Step7 running under Win 7.

Regards
Brian

I have known lot of stuff, then also needed to admit I was wrong... I was merely asking one example of code that does not work like you expect it to work.

I have hard time seeing, how you blame win7 of your problems, when its in real plc when it does not work like you expect it to work. Ofc, you could compile same code in xp mode then download and see if problem is still there.
 
Last edited:
I have known lot of stuff, then also needed to admit I was wrong... I was merely asking one example of code that does not work like you expect it to work.

I have hard time seeing, how you blame win7 of your problems, when its in real plc when it does not work like you expect it to work. Ofc, you could compile same code in xp mode then download and see if problem is still there.

I would hate to admit that if I'm wrong..... ;-)

This code for example works with out problems until the other day, I copied the sourcecode to the new project, compiled it and downloaded it, at it just vent crasy, after 2 hours of struggling I gave up and vent home, Friday I compiled it and downloaded it again and it worked ????

Please understand, I am not blaming either Win 7 or Step 7, I am just wondering why the problems suddenly increase, after the change to Win 7, I have been programming Siemens plc's for more than a decade, I am not saying that i don't make errors, becaurse I do. It could of course be an coincidence, but instead of using days and weeks finding out what is wrong, I just wanted to know if some of you is seeing something similar.

This code is not that old, but it seems pretty forward.

/Brian

Code:
FUNCTION_BLOCK FB96
VAR_TEMP
    // Temporary Variables
     x : BOOL;
     x_old : BOOL;
     xEdgeDetected : BOOL;
END_VAR
VAR
    // Static Variables
    Aux : BOOL;
    Index : DINT;
    Store_X : ARRAY[0..100] OF DINT;
    Store_Y : ARRAY[0..100] OF DINT;
    Input_Array_1 : ARRAY[0..100] OF BOOL;
    END_VAR
VAR_INPUT
    // Input Variables
    Request : BOOL;
    X_Coordinate : DINT;
    Y_Coordinate : DINT;
    Input_1 : BOOL;
END_VAR
VAR_OUTPUT
    // Output Variables
    Actual_Index : DINT;
END_VAR
 
 // Edgedetection
     x := Request;
     xEdgeDetected:= x AND NOT x_old;
     x_old:=x;
// Data FIFO
    IF xEdgeDetected THEN
        Store_X[Index]:= X_Coordinate;
        Store_Y[Index]:= Y_Coordinate;
        Input_Array_1[Index] := Input_1;
        IF Index < 100 THEN
        Index := Index + 1;
        ELSE Index:=0;
        END_IF;
    END_IF;
Actual_Index := Index;
END_FUNCTION_BLOCK
 
Another thing, when I was trying to find out what was wrong, I made some changes to my code, adding a temp variable, and updated the block call, and regenerated the instance DB, but for some reason the new temp was still missing in the Instance DB.
 
Yes, its temps.

Temps are not remembered between calls. Temp is just temporary, it is not in datablock, it is L memory area that gets assigned for every call of block and then freed for use of another call.

x_old needs to be in VAR.
 
Ouch....

Can you explain why it worked, until now ?

I have tried to explain this in a former thread:
http://www.plctalk.net/qanda/showpost.php?p=428296&postcount=8

The temps are in an stack that is shared by the block calls. You might have been 'lucky' and been so far down in the stack that no other blocks accessed your temp.

And if you test the rotten code as the only call in PLCSim, all works as supposed and you'll never discover the evil nature of the temps until...

I must admit I have s**t on my leg this way many times . The more coffee the better coding
icon12.gif
.

Kalle
 

Similar Topics

Hi, this is my problem, I created an app on FT Administration Console, in fact, one for network and one for local, I changed the connection to...
Replies
0
Views
1,669
Hello Guys, I am new the forums ad well as a novice programmer/troubleshooter. My software is Siemens S-7 for a 300 PLC. My problem: Coding, I...
Replies
3
Views
1,673
Hello! I have problems with two System Electronics Quad Remote Microstep Drivers. From notes added to them, I know that one don't control motors...
Replies
0
Views
1,846
Hi, I use the CPU 417-4H from Siemens with the Wincc interface. To the system are connected analog inputs SM 331 that are not connected to...
Replies
2
Views
1,718
I tried to archive a Step 7 project today and ran into a problem I have not seen before. I have a customer with systems at several locations, so I...
Replies
2
Views
2,523
Back
Top Bottom