s7-200 BCD data input

blokl

Member
Join Date
Aug 2006
Location
Berkel
Posts
11
Hello,

I got a cpu 226xm, this one has only dc input and output. I want to read BCD input on I0.1
Does anyone know how to do this?

thx.
 
As Binary Coded Decimal requires 4 bits per digit, I think you'll find this impossible to do with just I0.1. Unless you're working with a serial interface, but this requires an additional serial communications module or reprogrammation of the programming port.


Kind regards,
 
I'm using I0.0 and I0.1, also I use an amplifying circuit to get the right data to the inputs. I only don't know how to read the BCD data.
 
I0.0 and I0.1, that's still only two inputs while you need four per digit. Using two inputs to get BCD data can only be accomplished if you're getting the data over some kind of serial communication. But without any further info it's almost impossible to help you any further. There are so many different serial systems: RS323, RS422, RS485, current-loop. Please provide us with more info if you want to be helped.


Kind regards,
 
OK, now where talking business.

The info about the amplifier circuit stated very clearly that you couldn't use just any opto-coupler. It had to be types which were fast enough at the LED side to 'see' signals of no more than 125µs long and prolonged these at the output side to more than 200µs. They even mentioned the right types to use: 4N28 or SU25.

Because the S7-22X series are newer than the S7-21X, I think it's likely these newer PLCs are faster and can detect signals that are shorter, but at the moment I don't know how much shorter. I don't have the info at hand here at home, but tomorrow I'll look it up in the office.

Another problem can be the DC amplification factor of the opto couplers. Sometimes this is below 1, meaning that the current through the transistor part is lower than the current used to drive the LED. If you provide more info about the used components, we might even point you to possible hardware problems.

Kind regards,
 
Thx. for you reply.

I'm using the hardware like the document, only my cpu is different. That's a S7-200 CPU226XM.
I'll be verry pleased if you got an solution for me.
 
OK, I'm at the office now and I have checked the information. I think the problem lies with the input filtering. Assuming you're using Step7 Micro/WIN V3.X or higher, you can find these settings in the project view under System Block - Input Filters:

S7-226XM_1.gif


You can see that these are initially set to 6.4ms:

S7-226XM_2.gif


You have to change at least the block in which are the inputs you're using to 0.2ms:

S7-226XM_3.gif


And one thing that a lot of people forget: download the system block to the PLC. I've seen it happen lots of times that people did everything needed to make things work, but forgot to download the system block, both on S7-200 as well as on S7-300/400 (although the procedure is a little different there).

Hope this helps.

Kind regards,
 
Last edited:
Hello,

When you load the tip45, they do those settings for you. so the input filters are set to 20ms. I also set the time delay to 35ms, because the cpu214 settings are from 5 to 255 and the cpu226 are from 1 to 255.
I also tried to change the background time settings but all of these wasn't the solution.
The systemblock is on by default for download in my situation.
Will you please look a little bit further?
 
Well, after carefully thinking it over I have to admit I don't know what else can be wrong. I don' have the hardware around to do some testing, so I guess I'll have to remain in the dark on this one. Sorry.

Kind regards,
 

Similar Topics

I want to measure temperature using two digital inputs. The temperature time module outputs a value in BCD every second. The 13 pulses are...
Replies
0
Views
1,538
I must admit it has been some time since my college days and I really haven't retained much since then. I am looking for some assistance with...
Replies
2
Views
2,547
Hi. I have a 222 CPU. I need to recover the program from the eeprom memory. Is it possible?
Replies
0
Views
9
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
219
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
73
Back
Top Bottom