plcforum.uz.ua

International PLC Forum
It is currently Thu Dec 14, 2017 5:18 am

All times are UTC + 3 hours


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Aug 09, 2017 5:07 am 

Joined: Wed Aug 09, 2017 4:38 am
Posts: 1
I have a project used PCS7V8.2 & IL & 315-2DP,
and I create a FB like "Lag" in APL.
The SCL program is shown as follows:

Code:
OUT := SEL(G:=LAG_T<=0.0,IN0:=IN + (sr_lv_out-IN)*(EXP(-Sample_T/LAG_T)),IN1:=IN);
sr_lv_out := OUT;


If the input ("IN") is fixed in a negative number always , and a few hours later,the output("OUT") shows “NaN”.
Why?
Is floating-point calculation overflow ?


Top
 Profile  
 
PostPosted: Wed Aug 09, 2017 8:59 pm 

Joined: Wed Apr 21, 2010 9:24 pm
Posts: 6
Show whole FB (with interface)


Top
 Profile  
 
PostPosted: Thu Aug 10, 2017 10:05 pm 

Joined: Mon Aug 23, 2010 9:32 pm
Posts: 2
"NaN" means "Not a Number".

To find the error we need to see the whole block !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by International PLCforum® Forum Software © PLCforum
Mobile version