You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old June 22nd, 2005, 08:33 AM   #1
Werner
Member
Netherlands

Werner is offline
 
Werner's Avatar
 
Join Date: Apr 2005
Location: IJsselstein
Posts: 336
S7 Jump labels

I'm using labels to jump to in Siemens STL software. I programmed the labels for future use, so they were never used to jump to. (I am still in the process of creating the software). I saved and closed the block. Later when I reopend the block all the unused labels were removed. I think thats nice when my software would have been finished. Now I have to retype all the jumps and save it when all jumps are used. Is there some kind of syntax checking function which is resposible for this automatic correction. If so, can I (temporally) disable it?

  Reply With Quote
Old June 22nd, 2005, 08:42 AM   #2
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,052
Yes, I've had this problem as well. I never did get to the bottom of it.

I particularly wanted each network in OB1 to be labelled to make it easy to skip over bits of the program during testing, but as soon as I commented out a jump to allow normal running of that bit of the program, if I stored the program, the label was gone!

I eventually solved the problem by creating a network with a list of JCs to all the labels and testing my M_FALSE bit which is never true.
  Reply With Quote
Old June 22nd, 2005, 09:00 AM   #3
Amr Hassan
Member
Egypt

Amr Hassan is offline
 
Join Date: May 2005
Posts: 340
I am not sure if i can understand the problem right but
why do not u add // before the label
this will be considered as a comment and will be saved if u close the block
  Reply With Quote
Old June 22nd, 2005, 09:20 AM   #4
Werner
Member
Netherlands

Werner is offline
 
Werner's Avatar
 
Join Date: Apr 2005
Location: IJsselstein
Posts: 336
Quote:
Originally Posted by Amr Hassan
I am not sure if i can understand the problem right but
why do not u add // before the label
this will be considered as a comment and will be saved if u close the block
You are right if I change the jump to comments the jumps will not disappear. This could be a work around the problem solution. Off course I could also program the jumps anyway. I just wondered if I could turn off this kind of auto correction.
  Reply With Quote
Old June 22nd, 2005, 09:32 AM   #5
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,052
Quote:
why do not u add // before the label
this will be considered as a comment and will be saved if u close the block


This is true, but it means you've now got two things to comment out instead of one and if the Block has a lot of networks, finding the right one can be a bit of a pain.
  Reply With Quote
Old June 22nd, 2005, 11:21 AM   #6
S7Guy
Member
United States

S7Guy is offline
 
Join Date: Nov 2003
Location: Dayton, Ohio
Posts: 1,250
As far as I know, there isn't a way to turn this off. When I will be programming jumps later, I'll just set up the jump destinations with NOPs, i.e.:

m001: NOP 0
m002: NOP 0
m003: NOP 0

and so forth.
  Reply With Quote
Old June 22nd, 2005, 07:04 PM   #7
John Gaunt
Member
Australia

John Gaunt is offline
 
John Gaunt's Avatar
 
Join Date: Nov 2004
Location: Tasmania, Australia
Posts: 362
Arrow

I don't like auto-correction.

Will the NOP 0 definately prevent the removal of the
unused labels?
  Reply With Quote
Old June 23rd, 2005, 04:11 AM   #8
Amr Hassan
Member
Egypt

Amr Hassan is offline
 
Join Date: May 2005
Posts: 340
no it will not
  Reply With Quote
Old June 23rd, 2005, 06:25 AM   #9
S7Guy
Member
United States

S7Guy is offline
 
Join Date: Nov 2003
Location: Dayton, Ohio
Posts: 1,250
Why not? Could you show a case where it won't work?
  Reply With Quote
Old June 23rd, 2005, 07:06 AM   #10
Werner
Member
Netherlands

Werner is offline
 
Werner's Avatar
 
Join Date: Apr 2005
Location: IJsselstein
Posts: 336
a m 2.0
jc M001

M001: s M 3.0

In the program above M001 will not be removed because the jump is used (JC M001). If there is no JC (or JCN/JNB etc) the M001 before the set instruction will be removed. This is kind of logical because the label is not used and therefor not needed.
  Reply With Quote
Old June 23rd, 2005, 07:09 AM   #11
Werner
Member
Netherlands

Werner is offline
 
Werner's Avatar
 
Join Date: Apr 2005
Location: IJsselstein
Posts: 336
Quote:
Originally Posted by S7Guy
As far as I know, there isn't a way to turn this off. When I will be programming jumps later, I'll just set up the jump destinations with NOPs, i.e.:

m001: NOP 0
m002: NOP 0
m003: NOP 0

and so forth.
This will not work. The program below will prevent removal:

A always_off bit
JC m001
jc m002
jc m003

Safe the block without the jumps, close the block and reopen it, then all unused jump labels are removed. Safe the block with the jumps and the labels are kept.

Last edited by Werner; June 23rd, 2005 at 07:11 AM.
  Reply With Quote
Old June 23rd, 2005, 07:36 AM   #12
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,052
Quote:
Why not? Could you show a case where it won't work?

Maybe this is a 300 / 400 difference.

In my 317 unused labels disappear leaving the NOP 0 behind.

The program listed by Werner is exactly the solution I came up with to solve the problem.
  Reply With Quote
Old June 23rd, 2005, 11:21 AM   #13
S7Guy
Member
United States

S7Guy is offline
 
Join Date: Nov 2003
Location: Dayton, Ohio
Posts: 1,250
Man, I need more sleep. I was reading the question wrong. Yes, the best way is to just add "scratch" jumps that you can add logic to later, and insert the markers whereever you want. That is commonly done to build jump lists that have large numbers of possible steps that will be filled in at a later time.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
COnverting S5 Real (KG) to S7 Real smersh LIVE PLC Questions And Answers 9 August 8th, 2011 10:53 AM
MPI comunication Manuel Raposo LIVE PLC Questions And Answers 22 July 16th, 2007 07:24 AM
S7 IEC timer - RESET functionality. JesperMP LIVE PLC Questions And Answers 6 May 28th, 2004 04:26 AM
Siemens S7 ethernet protocol fzhang LIVE PLC Questions And Answers 3 May 19th, 2004 01:06 PM
Merging labels and ladder on a PLC5 Philadelphia Frank LIVE PLC Questions And Answers 3 April 30th, 2004 01:04 AM


All times are GMT -4. The time now is 09:55 PM.


.