BCD conversion error

Krcedinac

Member
Join Date
Jul 2006
Location
Krca
Posts
163
Hello to all,

Yesterday the production line stoped and since then we have SF light on the PLC (S7 315-2DP). Here is the screen shoot of the Diagnostic buffer:

PLC_screen.JPG


DO16xDC24V is avalable and OK. They put different then configured but it has been working like that for years.

This is the first time for me to see something like this.
Any ideas?

Thanks in advance.
 
If you really want to know where the error occurs (and hopefully it only occurs once per cycle) you can create OB121 (as suggested in the Details on Event in your screen shot)

This will cause OB121 to be called everytime you have that error (or any other programming error)

The information this OB121 provides and you need are located in its Local memory:
LB 4 // What kind of block the error occured in: 88=OB, 8A=DB, 8C=FC, 8E=FB
LW 8 // Number of the block the error occured in
LW 10 // Address in that block, where the error occured in.

Transfer that info to either MW or DB (inside OB121 of course) and you can start the search.

If OB 121 is called multiple times it is rather easy to find out how many times and knowing how many times, you can collect the data you need for everytime it is called.

Just remember, once OB 121 is created and downloaded, the PLC will not go into STOP anymore due to programming errors.

Hopes this helps. If further info is needed, just ask...
 
Hi Jeebs
I think Krcedinac already has OB121 in his program,and does not have code which you have sugested written inside it.Thats why PLC is in ERROR mode and is not STOPED
I myself keeps the OB121 empty, as i didn't knew what to write in it.But now I think i can utilize OB121 properly,(y) .
 
From the diagnostic buffer entries shown, OB121 already exists and the plc is in run even though there is a system fault. An alternative is to delete OB121 in the plc and let it stop and then use the diagnostic buffer and stacks to track down the problem. If you want to find all the BCD conversion instructions, generate a source file containing all your OB/FB/FC blocks, then search that file for BTI, ITB, BTD, DTB instructions. (source file is generated from the block editor under File>Generate Source).
 
L D[AR2 said:
If you want to find all the BCD conversion instructions, generate a source file containing all your OB/FB/FC blocks, then search that file for BTI, ITB, BTD, DTB instructions. (source file is generated from the block editor under File>Generate Source).
Wow !!
You never know how much you don't know !
 
Thank you all for such usefull informations,

The line is running at the moment, the problem was with the faulty emergency button. This morning when I came I was told that PLC is in fault so I went first to check that.

Any way I was monitoring a little bit a situation and saw that every time the line stops I have "BCD conversion error". That probably means that somewhere in the program something is divided by machine velocity ( zero when the machine is stopped). Since the line is running I uploaded program from the PLC and downloaded it to PLCSIM and the situation is the same. Now I will use the methods that you suggested to trace the error.

One more time, thanks very much for the help.

Best regards
 
Got it!

Hello again,

One of the tags that are entered throught the panel was out of range for ITB conversion (> 1000), so that was the reason for error. Just to mention that it was used only when the machine is stopped to set the value for delay timer. That was the reason why there was SF only when the line is stopped.

Regards
 
Good to see you found the problem.
When using panel to set timers I usually limit the input to 3 digits, just to make sure it won't cause any problems later on......but you probably fixed that already.....
 
This should be a sticky thread and used as an exemplar to all new posters.

From first post with problem to acknowledged solution in just over 4 1/2 hours with three respondents involved in that time. And why? Because lots of useful information was given straight away. Well done, Krcedinac, that's exactly how to ask a question.

Ken
 
One way to avoid using OB121 is to mask the fault with SFC36. SFC36 allows you to selectively disable or filter out errors. When an error is filtered it is ignored by the operating system and OB121 or OB122 is not called. Then use SFC37 after the timer to deselect the mask e.g. (IW4 is your BCD Thumbwheel)

s7ex.JPG
 
Last edited:

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
107
Hi, I recently added a BCD to int conversion block to compare 2 MW. The CPU has a SF error.In the diagnostic area it shows BCD conversion error. I...
Replies
1
Views
5,001
Hi. I’m doing a PV 1400e to PVP 7 migration and I don’t know how to convert the old 8digit BCD type from PB1400e into something that will work on...
Replies
2
Views
586
Hi there. I have a Micrologix 1100, I have 6 switches to I:0/0 through I:0/5. My plan is to use I:0/0 to I:0/3 as set for a value of 0-15. I:0/4...
Replies
3
Views
1,691
Hi all, I am quite new to PLC programming, so pardon my noob-ness. First, I have counters & timers in my program that I use to calculate total...
Replies
2
Views
3,534
Back
Top Bottom