Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Why 'Expression error; Not a Number, or Divide by Zero (code 81)' error?

HELP!

Lookout 5.1 build 8:


I have an application using a DeltaTau PMAC-PCI Motion Card and Microcim OPC for PMAC.

Here is the lines from the source code...

Definition of MX_velocity...

M1_velocity = new Derivative (abs(OPCclient1.
PMAC0.PMAC_0.motor_1_scaled_position), 0:00.10, 0:00.20);

M2_velocity = new Derivative (abs(OPCclient1.
PMAC0.PMAC_0.motor_2_scaled_position), 0:00.10, 0:00.20);

M3_velocity = new Derivative (abs(OPCclient1.
PMAC0.PMAC_0.motor_3_scaled_position), 0:00.10, 0:00.20);

M4_velocity = new Derivative (abs(OPCclient1.
PMAC0.PMAC_0.motor_4_scaled_position), 0:00.10, 0:00.20);

M5_velocity = new Derivative (abs(OPCclient1.
PMAC0.PMAC_0.motor_5_scaled_position), 0:00.10, 0:00.20);

Area where (MX_velocity)*10 resides...


(M5_velocity)*10 {l= 495,t= 101,w= 140,h= 46,opt=74,type=4
,bclr=0xFFFF80,fmt="0.00",grp=1,fht=-37},
(M1_velocity)*10 {l= 495,t= 147,w= 140,h= 46,opt=74,type=4
,bclr=0xFFFF80,fmt="0.00",grp=1,fht=-37},
(M2_velocity)*10 {l= 495,t= 193,w= 140,h= 46,opt=74,type=4
,bclr=0xFFFF80,fmt="0.00",grp=1,fht=-37},


These are dislayed velocity values for 3 of the axis.

The application will run for a few days then the alarm database will be overrun with the following alarms until the application will not run anymore.


'Set',2004-08-28 08:11:15.288,8,'\\gogan-taper-2\GOGAN2','Math','super','(M5_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:15.288,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:15.498,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:15.498,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:16.838,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:16.838,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:17.238,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:17.238,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:17.448,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:17.448,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:17.848,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:17.848,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:18.058,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:18.058,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:18.458,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:18.458,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:18.668,8,'\\gogan-taper-2\GOGAN2','Math','super','(M2_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Reset',2004-08-28 08:11:18.668,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'
'Set',2004-08-28 08:11:19.068,8,'\\gogan-taper-2\GOGAN2','Math','super','(M1_velocity)*10',,,'Expression error; Not a Number, or Divide by Zero (code 81)'


Anybody know what is wrong here?


Regards,



Paul E. Rogers aka petrrj
0 Kudos
Message 1 of 7
(4,898 Views)
It sounds like you may not have set the Derivative parameters properly. According to the help for the object, "It is important to consider the resolution of the process variable measured by the PLC when determining the Update period for this object. For example, a pressure transmitter connected to a PLC has a resolution of 0.5 psi, and you want to measure rates down to 1 psi/minute. The Update value must be greater than 30 seconds even if the PLC is polled once per second (i.e., 0.5 psi/1 psi/min. = 30 sec.). For this application, the Update value should probably be about two minutes."

"The Update period should be greater than the refresh rate of the incoming signal. Or if the Input value is generated directly by external I/O, the update data member generated by the PLC object should be used. If the Update period is less than the Input refresh rate, the rate of change calculation fluctuates erratically between zero and a high value."

What are you expecting the derivative to be when it crashes? Did the values change drastically during that time? Can you reproduce this one a simple process?

Regards,

Kristi H
0 Kudos
Message 2 of 7
(4,876 Views)
Kristi H:

Thank you for responding...

That function is to produce the velocity of the axis based on distance over time... The PMAC controllers own velocity data is to jumpy at zero speed.

The thing that is maddening it that this same code (short the OPC driver) is running without this error for 7 years on version 3.X of Lookout on Win 3.11.

The other thing is that the process will run for days without spewing these errors... Then this phenom will show up and choke the processor with handling the flood of messages... Bring down the lookout to it's knees and makin the GUI seemed locked up...

Refer to the above attached files...

It is killing me!!!


Best Regards,



Paul E. Rogers (petrrj)
0 Kudos
Message 3 of 7
(4,873 Views)

I have the same problem when we recently upgraded to Lookout 6.1 from Lookout 5.1.

I have a formula that calculates pump efficiency when it is running. But when that pump is stopped it generates this alarm.  This did not happen in Lookout 5.1.  Is there a way to change the alarm priority on these math alarms. I have tried to go to "edit data member configuration" for this expression with no success.  Any ideas.

Joseph Schlosser

 

0 Kudos
Message 4 of 7
(4,404 Views)
You can not change the priority. But you can filter it by the area. The alarm area is Math, if you don't want to see such alarms, configure the filter by Area Name.
 
Or you can modify the expression. For example, if you have expression = A/B, you can modify it to if(B=0, 0, A/B).


Message Edited by Ryan.S on 04-20-2008 09:12 PM
Ryan Shi
National Instruments
0 Kudos
Message 5 of 7
(4,387 Views)
How do I filter out just the math alarms and still get every other alarm? . Any way I try I filter all alarms out
0 Kudos
Message 6 of 7
(4,377 Views)
I was wrong. The filter configuration just configures which to pass, but not which to be filtered...
 
We may reconsider the priority of this alarm, if actually it's not a big issue.
Ryan Shi
National Instruments
0 Kudos
Message 7 of 7
(4,367 Views)