holding last value in .csv logging


qwert

Recommended Posts

hello ,

 

i'have logging data using the "ASCII delimited" using protocol "mod-bus tcp-IP" and time out is 1000,...using this i communicate plc and scada successfully .

my first question is that if i remove the communication cable then after the graphical representation is not changing means that scada representing healthy graphical representation instead of cross marking representation.linking my second question is that after removing this cable i want data logging in .csv format which is working o.k but in data logging it holds last value which i don't want.

for example,if communication cable is inserted the data logged values are 12,13,11,0 and at the time of  removing communication cable if at that time last value is 13 then it will continue log data 13 means it holds last value.but i want if communication breaks than then doesn't hold last value.

Link to comment
Share on other sites

OK, if I understand you right:

1) to show that comms is lost, compare the system time to the time of the last data point on one of your channels.  For example, you might use a Descriptive Text component where the expression is:

systime() - myChannel.time[0] > 2

and when this is 0, then everything is ok, but when its 1, comms is lost.

2) I'm assuming you are using a logging set.  If so, on the details page you need to use "All Data Points", and make sure "Empty Field" is selected.

 

Link to comment
Share on other sites

thanks for quick response...

continue to last answer of your last reply....but i'm using "fixed interval" and also set interval to "1" which gives me data logging on interval of 1 second ...which suits on my requirement, so i want  with this settings to scada that it will not hold last value after communication breaks. 

Link to comment
Share on other sites

You cannot use fixed interval and get blank lines.  Fixed interval goes out every second (in your case) and looks at whatever the last read value was.  It does not look at the data age.  Only the All Data Points with Empty Field will do that.  Or of course, you could just write some script to do your logging using the File. functions and log it however you want.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.