S7-300 Can't find inputs or outputs?

Join Date
Jul 2008
Location
SWANSEA
Posts
8
I have an uncommented plc program of a working machine and can't find the relevant outputs in the cross reference (so that I can work backwards to find the problem). In the past I've seen programs that mirror them to other data areas but I can usually see the base address listed but not this time. Are there other ways to find them? The inputs and outputs are listed in the hardware Ok.
 
Could be because indirect addressing is used.
You could export everything to STL source, and then do a text search for "AR1".

If the i/o is connected via an onboard DP port, then also search for SFC14 and SFC15.

If there is a CP342-5, you may have to look for FC1 and FC2, DP_SEND and DP_RECV. There is the likely possibility that FC1 and FC2 have been renamed to some other FC numbers. If that is the case, you can try to find them by comparing the file sizes. DP_SEND is 886 bytes, and DP_RECV is 950 bytes.
 
To export as STL source, open any block in the LAD/STL/FBD editor.
Then from the menu select File .. Generate source. A dialog will appear where you can add the blocks to generate the source for. Select all blocks.
When done, there will be a new file in the Sources folder. It is one big STL file which you can use to search trough all blocks at the same time.

If you find some code that could look as a likely candidate, then post it here. Then some expert can dissect what goes on.
 
Create a library and insert a S7 program into it, copy the blocks from your project blocks folder to the library blocks folder. Archive the library and then post the zipped archive.

The posted code has been uploaded from a plc - where is the original project with comments and variable names ?

qqq.JPG
 
Last edited:
Unfortunately I do not have a commented program (see first thread). I have attached the program as you instructed. I would like to know how the addressing has been set up so that I can find out what controls output Q16.5

Cheers
 
What output modules are there ?

I think that FB2 is some kind of output distributor.
And FB2 is called twice in FC101. And FC101 is the last block in OB1, which would be logical as settings the outputs should be the last things in the scan.
It could be that each call to FB2 distibutes 16 outputs. edit: Or 16 output bytes.
I cannot really digest the workings of FB2 in a hurry though.

edit: There is a loop, so that FB2 is run though 16 times.
 
Last edited:
and the Inputs are distributed in FC100.

Really not a friendly programmer is he.

I presume they didn't want their program copied.
 
He's being tricky that's for certain.

The M flags that he enters FB2 with will be equivalent to outputs.

In the block he does not access these input parameters directly, he accesses them indirectly from the instance DB addresses for which they are equivalent.

DB102 appears to be some sort of struct that is linked to the onboard IO and the IO cards, I suspect some sort of pointing address.
 
Just seen where your from Keith, I'll be listening in to us beating Blackpool tonight (or this afternoon to me) :)
 
Last edited:

Similar Topics

Can anyone help me to select a step 7 version and a matching simulator for s7-300 PLC? Is there a place where i can download them for free?
Replies
12
Views
6,967
I've never personally used Siemens S7-300s. I'm looking for an affordable way to get an Ethernet capable S7-300 series PLC for a driver research...
Replies
17
Views
7,098
Hi Siemens guys! I am experiencing SF fault on our S7-300 (6ES7 315-2AH14-0AB0) CPU from time to time. I've checked the diagnostic buffer and...
Replies
13
Views
129
Have a system that has been running for over a year and all of a sudden getting a ExcessiveVelocityFault on one of the drives when the MSO command...
Replies
2
Views
142
Hello PLCS.Net Forum, First time posting. Let's assume I am a novice. BASIC PROBLEM: My servo/linear piston is no longer zeroed to the...
Replies
9
Views
211
Back
Top Bottom