S5 simple maths crashed CPU??

Johnny T

Member
Join Date
Jul 2003
Location
Fife, Scotland
Posts
642
Hi

This is the last one of my long list of questions for now...

Yesterday I was doing a quick job on an S5 PLC and entered the following code:

C DB 24
L DBW 241
L KF+6
XF
T FW 222

This crashed the PLC and put it into stop mode??? Anyone any ideas why??

The DB 24 exists and has a DBW 241. FW222 is available in this PLC as FW 225 is being used elsewhere in the program. The code was in PB99 which was downloaded correctly and being called by OB1.

Basically I was trying to multiply the contents of DBW241 (which were only 12 so not going to cause an overflow or anything) by 6 and transfer the result into FW 222...

Any ideas why this should cause a crash?

Cheers

JT ;-)
 
Does the CPU support XF ? - I seem to recall that some lower spec CPU's could not do multiply and an FB was used to perform the multiplication instead.
 
I'd have to check but I think its a 115U 944. Which to my knowledge is one of the bigger beasts. Although what you have said would make sense as I changed the code to a 'move'.

C DB 24
L DBW241
T FW 222

And it worked fine.. so it all points to the multiplication..
 
Johnny,

My S5-115U, CPU 941/942/943/944 reference manual ( Click here for link) does not list multiplication as an available maths function, it only lists + and -.

So, it looks like you're out of luck there.

Paul

P.S Page 16 has this info on it.
 
I don't know the english mnemonic for Step5,
but I think ' L DBW 241' is only valid in Step7.
Try 'L DW 241' instead.

Regards
Rolf
 
RolfB said:
I don't know the english mnemonic for Step5,
but I think ' L DBW 241' is only valid in Step7.
Try 'L DW 241' instead.

Regards
Rolf

Rolf

You are right.. I did type L DW 241 but just mistyped it here... thanks.

Paul and 504bloke, thanks for the info. That sounds like the problem... many thanks for the manual too, much appreciated.

Cheers

JT ;-)
 

Similar Topics

Hi I am fairly new to PLC programming and I am self learning. I have written a simple program to detect and store the RPM and ultimately the...
Replies
0
Views
1,413
Hello again..trying something on an existing poorly written program and just wanted to double check something system is an A-B MicroLogix 1200 In...
Replies
5
Views
165
Hi all, Writng a FB in ST on Beckhoff TC for a pulser which turns on and off on a cycle, is paused by turning bControlInput to FALSE, but resumes...
Replies
6
Views
248
I'm trying to build my Classic Step 7 programming skills this weekend. I get stuck on little things that are not covered in YouTube tutorials. I'm...
Replies
7
Views
316
I have a program that does a 7 second "scan" sensor calibration routine whenever a setting (setting is called assistance level or "AL" and ranges...
Replies
3
Views
212
Back
Top Bottom