Divide by zero error on PLC 5/40

akrafter

Member
Join Date
Jan 2011
Location
Fairbanks, AK
Posts
12
I ran across this example in the PLC 5 instruction set help (see attached screenshot). I've run into divide by zero errors before, but I couldn't remember if it was only on SLC's. It seems odd that Rockwell Software would be using an obviously faulty example in their help files...Does the divide by zero error not exist on the PLC 5?

PLC 5 Instruction help.jpg
 
My guess is that the screenshot was done just to show the layout of the instruction block, not its function.

The author missed an opportunity to illustrate datatype conversion, and shows an invalid entry.

The more I read this the less happy I am with the text: it includes word and sentence fragments, implied subjects, and omitted articles.

It also doesn't make sense to mention Long Integers in a PLC-5 reference book, as the PLC-5 doesn't support them.

Here on the Forum it's nearly impossible to get users to form complete sentences, so I am starting to despair over the possibility of concise and accurate technical communication, even between people divided by a common language.
 
Last edited:
Now, back to the actual question.

The PLC5 doesn't throw a fault on a divide by zero. It will display a +INF or -INF to indicate the value went to infinity. But it won't fault. That was one of the bigger lessons I learned moving from PLC5 to SLC.

Keith
 

Similar Topics

Hello everyone. Does anyone know if it is possible to stop Twincat being stopped when a divide by zero error occurs? Many variables that are...
Replies
3
Views
5,217
Gents, We had to replace an CJ1G cpu for an CJ2M to get an Ethernet port on a machine. I uploaded the PLC program including memory area, and...
Replies
18
Views
5,175
I have read a lot on average's and different methods on how it is done. what is the advantage of using a fiof or the Avg function as to just a...
Replies
16
Views
4,086
Hello all Are there a way to DIV in a Micrologix 1200 or 1500 using LONG 32bit integers without rounding up. regards, scott _________________
Replies
5
Views
3,322
Hello! I am simply trying to convert a distance in inches to feet showing the number of feet with the fractional part just displayed as .xxx. I...
Replies
2
Views
2,629
Back
Top Bottom