S7 - Viewing S7-GRAPH program in STL

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
Does anybody know an easy way to open up an S7-GRAPH Block directly in the STL-Editor. That is without going to the trouble of either de-installing S7-GRAPH temporarily from the PC or installing S7 alone on some other PC.

Following my lack of success with PDIAG - see other thread - I've enabled ALARM_S calls in S7-GRAPH and I'd like to take a look at the code it's created.
 
Delete the graph block from the sources folder only (make a back up first), leaving the FB in the blocks folder. When you open the FB in the blocks folder, S7 will bleat there is no symbol information but you will be able to inspect the STL!
 
Last edited:
I made my backup and went to delete the Graph block in the Sources folder, only to discover that the sources folder is empty apart from one DB AWL-source that I created while trying out Jespers trick for editing DBs with Excel.

I've had a look through the other folders and checked that I've got no filters enabled, but I can't see any likely canndidates.

Any other suggestions where I should look?
 
Apologies for the first suggestion, I was thinking of SCL....

To view a graph block in STL you must use windows (close Step 7 first) and remove the Graph7 installation from your PC (start/control panel/add/remove programs). When you open the block you can only view it STL - you have to then re-install graph7.
 
That's what I was hoping to avoid, but I can't say I'm too surprised.

Thanks a lot anyway.

P.S. I see you're from Bedford, I had a house in Biggleswade for about ten years, mid'80s - '90s.
 
Roy,

Open up the STL editor as normal (either from the SIMATIC Start Menu, or by opening a genuine STL block and then closing that block but leaving the editor open).

Now do File / Open and select the FB you want to open. It doesn't matter if the FB's been coded in SCL or S7-Graph, the STL editor will simply open the block as STL code, with no attempt to reference any source files.

What you have to do next is persuade me that there is a very good reason for doing this. Why on Earth would you want to edit or read an S7-Graph file in STL? You must be mad, man!

regards

Ken
 
Ken, During a recent exercise of porting some S7 code to Twincat, I ended up re-coding an FC written in STL into SCL (SCL ports into Twincat real easy, STL not so easy). The re-compiled block was 1/3rd the size of my original STL block and I wanted to know why ! so, I had a look at the STL the SCL compiler had produced. Even though there were no comments etc, it did prove instructive.
 
HI Ken,

thanks for the suggestion, I'll try it out tomorrow.

Why do I want to do it? Simple, I'm still struggling to get to grips with ALARM_S. In GRAPH I have the option to generate ALARM_S messages automatically (and´I've tried it this afternoon, it works, although I don't seem to be able to acknowledge and get rid of the message) and I wanted to see what code GRAPH had produced.

@SG, that's interesting to hear, up till now I've only ever heard comments about how wasteful SCL is in comparison to STL and how much bigger (and slower) the SCL compiled blocks are. Interesting to hear of it working out in the other direction occasionally. Won't do me much good though. I come from a hardware and not a software background and I don't get on at all well with SCL. In my PDP11 days, 30 years ago, I used to prefer coding in machine code to Assembler, maybe that's why I feel much more at home with STL!

This is another of those situations which pi$$es me off with Siemens. I sometimes have the impression that they intentionally write their manuals and helpfiles somewhat cryptically, so that you are forced to buy their "kostenpflichtige" sample programs. For the price they demand for their S/W licences (never mind the H/W prices) I would think sample programs ought to be automatically supplied - I guess that's wishful thinking though.

If I can't crack this in the next few days though, I think I'm going to be back looking for sample ALARM_S programs! While I prefer to struggle through on my own (because I remember it better that way), time is starting to run out on me!
 
Well that was certainly very educational! Didn't help me at all as far as my ALARM_S problem is concerned, because Search didn't turn up a reference to SFC, ALARM or anything else I could think of, so heaven knows how that works!

On the other hand, I now know why the maximum number of Steps and Transitions in a GRAPH program is limited to 255. This is because the first network consists of nothing more than a series of JLs to the various paths in the program and in particular to the Transitions and, of course, JL can handle a maximum of 255 Jump targets (evidently a Byte oriented command). In my biggest program I've got 247 Transitions, so now I know why I had to break it down into three separate bits! (The 247 Transistions are after having split the program up.)

There was another interesting curiosity, but that's worth a Thread of its own.
 

Similar Topics

I'm trying to check out my program using PLCSim and because of the size of the project everything runs pretty slowly. So in order to keep track of...
Replies
8
Views
5,808
I got my PanelView Plus 7 working with a Micrologix 1500. How would I connect my laptop to the PanelView to view the ladder logic while operating...
Replies
6
Views
137
Looking for some assistance. I am very familiar with Yaskawa VFDs, but not so much with AB VFDs. I am working on some hardwired AB PowerFlex 700...
Replies
2
Views
136
Hello all, First time poster, long time viewer of these forums. Could not find my solution on here. We have had issues with a Comm Fail on an...
Replies
2
Views
390
When I added device Powerflex 525 to my project,The ( current tag) was not populated .How can I retrieve this data ? Thanks Jeff
Replies
3
Views
557
Back
Top Bottom