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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 10th, 2005, 04:38 AM   #1
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,039
S7 - CPU still trying to access DP-Slaves although theyve been deactivated with SFC12

Out of 21 (near identical) Modules in this system, I have only one available to test on. On start-up I check to see which Modules are not available and then prevent these being selected. I also disable them using SFC12.

Most of the time I check whether a Module is selected before accessing it, so there is no problem. However, because the outputs of the Modules (Electrical pulses of up to 43 kA at 24 kV) are connected in parallel to one of four so-called Collectors by motor-driven switches which can also be switched by hand, it is always necessary to check that the switches of non-selected Modules are open before triggering a pulse. Since during the commissioning phase it is more than likely that a Module will be physically present but not switched on, the auto-detection of available Modules is not a sufficient safety precaution, so I must always check the state of all Modules.

Unfortunately, when I enable the S/W to do this despite having disabled the Modules I get flooded with I/O faults which pushes the cycle time up over 1 second and the CPU goes into STOP. I don't know what the maximum cycle time is, but I've set it at 500 ms at present (to try and avoid the problem) and I don't really want to increase it any further.

I've checked the state of the Modules using SFC12 Mode 0 and they all report that they are disabled. The Help file for SFC12 states quite explicitly that after being disabled, the DP-Master no longer accesses the Slaves and that the Process Image is updated with "0"s.

One thing that is a bit strange is that as long as I don't call the monitoring Block, there is no problem which implies that the Process Image update is not normally attempting to access the DP-Slaves that are disabled. The second peculiar fact is that I get exactly the same problem if I enable my general error checking S/W, even though in this case, the Modules are only accessed if they are selected.

All suggestions of how to solve the problem or locate its source would be very welcome.
  Reply With Quote
Old June 10th, 2005, 04:53 AM   #2
SimonGoldsworthy
Member
United Kingdom

SimonGoldsworthy is offline
 
SimonGoldsworthy's Avatar
 
Join Date: Mar 2005
Location: England
Posts: 1,079
Could you do all the module detection/disabling from OB100 ? There is no cycle time monitoring in this block so you can loop and take as long as you like to get your system "smart" before running OB1.
  Reply With Quote
Old June 10th, 2005, 06:07 AM   #3
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,039
Unfortunately either the FC125 or the SFC12 explicitly cannot run in OB100, but that's not the problem anyway, the indentifying and disabling of the non-existant modules works fine and as I said, after the system was up and running I enabled a patch to check the state of the modules and all the missing ones reported back that they were disabled. The one that was present also reported back, correctly, that it was enabled.

The problem is that under some circumstances and at present I'm not sure exactly what these circumstances are, they are not behaving as they should, or to be more precise, the CPU is not behaving as it should.
  Reply With Quote
Old June 11th, 2005, 05:28 AM   #4
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,039
I wonder if ...

this might have something to do with it.

It occurred to me at 4:00 this morning that while I was having problems deactivating the missing DP-Slaves, I commented out the calls to the three supervision and fault-checking blocks. To enable these blocks I just edited out the comment signs and downloaded OB1 to the PLC again, but I did this online, while the PLC was running.

In the help file, I'm pretty sure it says explicitly that on a restart the deactivated DP-Slaves will be reactivated. I wonder if on restarting OB1 after downloading it, an implicit restart is occurring. I could certainly imagine that OB1 might well be handled a little differently than ordinary FBs and FCs.

It'll be Monday before I can check this out, but maybe somebody knows the answer already.

Cheers

Roy
  Reply With Quote
Old June 13th, 2005, 03:22 AM   #5
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,039
Well, I've checked it out and the answer is "NO"!

I modified the 3 supervision blocks to put a BEA at the start, so that they wouldn't do anything. Then I modified OB1 to call all three, instead of leaving them commented out and downloaded OB1 and the three supervision Blocks to the running CPU. Result, the CPU kept on running and checking the state of the DP_Slaves showed that they were still reported as being disabled - so that isn't being changed.

Then I went back into one of the supervision Blocks and commented out the BEA and downloaded it to the CPU. Result - cycle time = 1000ms, CPU -> STOP!

The only thing that occurs to me at the moment is that after start-up most of the I/O is not being accessed, because I have the program divided into Phases and the I/O is only accessed when it is needed and immediately after start-up, it is not being accessed.

What it looks like (and I'm not saying that this is definitely the case!) is that regardless of whether or not the DP-Slave is deactivated, the first time the program tries to access some I/O, the CPU tries to access it regardless of the activation state of the DP-Slave.
  Reply With Quote
Old June 13th, 2005, 04:38 AM   #6
RMA
Member
Scotland

RMA is offline
 
RMA's Avatar
 
Join Date: Sep 2004
Location: North of Hamburg, Germany
Posts: 2,039
Correctly observed effect, completely wrong assumption about cause!

This Thread can now be laid to rest!

In the diagnostic buffer I noticed that one of the DBs that was open at the time of the CPU timing out was the Status DB for the last of the modules to be checked. Thinking that this might explain why occasionally the FB would run OK and on other occasions cause a CPU time out with a cycle time of 1000 ms, I upped the allowable cycle time to 1 second and tried again. Now if the timing had been touch and go before, twice the amount of time must surely be enough, but no, once again the CPU went into STOP after a cycle time of 2000ms.

OK, I know I'm sometimes a bit slow on the uptake, but I'm not totally daft. Following the checks on the last module, there is a network with a little bit of code which checks to see whether there has been a fault and if so causes a jump to the appropriate fault screen. So I put a BEA at the start of this network and sure enough, no more crashes.

So there we have it - end of one Thread, start of next one!
  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
S7 CPU serial number access Willy Maas LIVE PLC Questions And Answers 2 May 9th, 2005 01:51 PM
connecting six S7 via DP donald_soft LIVE PLC Questions And Answers 7 February 15th, 2005 02:28 AM
Doing the "impossible" with S7 DP comms. JesperMP LIVE PLC Questions And Answers 51 December 15th, 2004 05:12 AM
Funny effects when uploading project to S7 300 CPU RMA LIVE PLC Questions And Answers 9 October 28th, 2004 07:44 AM
S7 CPU Parameterisation problems after loading program RMA LIVE PLC Questions And Answers 12 October 7th, 2004 09:12 AM


All times are GMT -5. The time now is 12:55 PM.


.