S7-313c

Join Date
Aug 2002
Location
Manchester
Posts
527
Hi
I'm trying to get the on-board high speed counter to go.
1. Does the pulse connect to I124.0?
2. The instance data block is telling me the hardware gate is FALSE. Which is the hardware gate input?

[MOAN]
I'm in work on a Saturday and the Siemens tech support website is closed for maintenance i.e. no tech support is available. Only got to wait 8 hours until the maintenance is completed.
[/MOAN]

Thanks
 
I think that I124.0 is a regular input you have separate inputs for the counter channels. Check the settings for the counter input under the hardware configuration. Dubbelclick on the count tab there you have all the settings for the counter input. There you can check whether you want to use the hardwaregate or the software gate on the fuctionblock call. I think the hwg input is located either under or over the inputs for respective counter channels.
 
Paraffin Power

The default inputs and ouputs for the 313C is I768 - I783 and Q768 - Q783. At least that is what Simatic Manager set them as when I set up a 313C in hardware setup.

See picture below

Paul

313c.jpg
 
I think the key here is to LOOK in Hardware Configuration and get the address. It can be different based on setup.
 
Thank you for all the replies.
Paul - thanks. The 768 address is used for configuration with SFB47. This I've done but still no joy.
rsdoran - I have LOOKED (quote) within the hardware config, and as PLucas said the base address of the counter is 768. I must have phrased my question wrong. I was after where, physically, the wiring goes.
 
Hi all.

I am replying to these posts, as the context of sfb47 is already on everyones minds. I am working on some code that I have "inherited" from the last programmer to work on a job. My problem is this:

The previous programmer left a comment in the code that indicates that he is setting the latch value of the encoder/counter to the counter value whenever I125.4 goes true. This does infact seem to be the case, as when I toggle the physical sensor on that input, the latch value changes to the current counter value.

This is all fine and good, but when I bring up the cross reference list, and search for I125.4, I can't find a single line of code that would assotiate this input with the encoder. Infact, I added a normally closed contact before all instances of I125.4 in the code, and the behavior still persists when I physically trip the sensor attached to I125.4.

My question then becomes, should I be searching elsewhere within the programming environment other than directly in the code for I125.4? I am beginning to think that perhaps there is an interupt defined somewhere to react to that specific input.

I'm sorry for the ambiguity of this post, I have been using the s7-300 processor for only a few months now and am still not 100% comfortable with the development environment.

Thanks.
 
damirault

I can not fully understand what you are trying to ask, maybe that's just me, one of the others here might understand a bit better. :confused:

As this is a thread from 9 months ago it might be an idea if you reposted your question in a brand new thread.

A picture tells a thousand words so, if you could include a screen shot of the code you are asking about that might help us to help you.

Paul
 
The Solution.

Ok.. after some time on the phone with Siemens... The solution to my problem has been found... For all those who care to know the details, read on.

Ok, the problem I had was that when input I125.4 was physically triggered, the counter module SFB47 was registering this as a special input and changing the current LatchValue to match the current CounterValue. There was ABSOLUTELY NO REASON in the code for this behavior, which explains why my efforts to nail down a rogue line of ladder were fruitless.

The counter definition for the S7-314 (I originally mentioned the unit was a 313) performs all functions related to hardware addressing from a single address - which in my case was 768 (which corresponds to I124.0).

The mapping of the various functions is defined in the table below:
Encoder channel A - Base + 0.0 = I124.0
Encoder channel B - Base + 0.1 = I124.1
Encoder N - Base + 0.2 = I124.2
Encoder Error - Base + 0.4 = I124.4
Latch
 
Sorry - hit the wrong key in the middle of a post:

Ok.. after some time on the phone with Siemens... The solution to my problem has been found... For all those who care to know the details, read on.

The problem I had was that when input I125.4 was physically triggered, the counter module SFB47 was registering this as a special input and changing the current LatchValue to match the current CounterValue. There was ABSOLUTELY NO REASON in the code for this behavior, which explains why my efforts to nail down a rogue line of ladder were fruitless.

The counter definition for the S7-314 (I originally mentioned the unit was a 313) performs all functions related to hardware addressing from a single address - which in my case was 768 (which corresponds to I124.0).

The input mapping of the special function block is defined below:
Encoder channel A - Base + 0.0 = I124.0
Encoder channel B - Base + 0.1 = I124.1
Encoder N - Base + 0.2 = I124.2 (might be wrong label)
Encoder Error - Base + 0.4 = I124.4 (might be wrong label)
Latch - Base + 1.4 = I125.4

So, as you can see, the Latch functionality is HARDWIRED, not hardcoded, or even coded at all (it must be coded in the Siemens special function block).

So, for all of you who beleived you were in complete control of all programming functionality, let my lesson learned help you along.

Thanks to all those who took the time to reply - I have appreciated your responses.
 

Similar Topics

hi... i have an issue in s7 300 plc, while we run the machine(in idle there is no fault) , plc cpu goes in SF mode, after restart the power cycle...
Replies
2
Views
117
Dear experts, I have the following setup: CPU-313C (6ES7313-5BF03-0AB0 V2.6) + CP343-1 (6GK7343-1EX30-0XE0 V2.0) communicating with Siemens PC...
Replies
7
Views
2,686
Hello Every one I am trying to connect the encoder with siemen's 300 plc but dont know how to do it... Could some one send me the connection of...
Replies
4
Views
2,200
hello Friend There is one old system with S7 300 CPU which is password protected and I dont know the password. Now I want to remove the password...
Replies
6
Views
5,915
Hi guys, I have CPU S7-300-313C ( Cat No - 6ES7-313-5BE00-0AB0) DI24/DO16 and AI5/AO2. when I am trying to configure and use the AO channel PQW...
Replies
4
Views
2,558
Back
Top Bottom