![]() |
||
|
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
| ||
New Here? Please read this important info!!!
|
|
#1 |
|
Member
|
S7 - Viewing S7-GRAPH program in STL
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. |
|
|
|
#2 |
|
Member
|
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 by SimonGoldsworthy; March 17th, 2005 at 05:57 AM. Reason: spelling |
|
|
|
#3 |
|
Member
|
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? |
|
|
|
#4 |
|
Member
|
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. |
|
|
|
#5 |
|
Member
|
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. |
|
|
|
#6 |
|
Member
![]() Join Date: Mar 2004
Location: .
Posts: 1,137
|
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 |
|
|
|
#7 |
|
Member
|
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.
|
|
|
|
#8 |
|
Member
|
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! |
|
|
|
#9 |
|
Member
|
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. |
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Topics
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CPU BASED PROGRAM LOCKING in S7 | arc | LIVE PLC Questions And Answers | 3 | May 28th, 2006 05:30 PM |
| S7 - Finding STL commands in Online help. | RMA | LIVE PLC Questions And Answers | 5 | February 20th, 2005 12:39 PM |
| S7 224 - Storing String variables in a program | ltrail | LIVE PLC Questions And Answers | 4 | November 30th, 2004 06:18 PM |
| S7 CPU Parameterisation problems after loading program | RMA | LIVE PLC Questions And Answers | 12 | October 7th, 2004 09:12 AM |
| S7 Stl Challenge | Combo | LIVE PLC Questions And Answers | 12 | May 16th, 2003 12:56 AM |