Min Max Numgate save

Discussion about Code Builder Builder and Winlog language support.
bctBCT76
Posts: 23
Joined: Wed Jun 24, 2015 11:39 am

Min Max Numgate save

Postby bctBCT76 » Wed Jun 24, 2015 12:08 pm

Hello All,
I'm new to this forum and Winlog. I need to write a code and accordingly create 2 numgates/variables to save the min and max value measured from a device and transferred to winlog by MODBUS RTU protocol. I can manage to read, report, plot a chart of that gate values but I cannot succesfully write the code and create the variables/gates to keep the historical mi and max value measured. I'm using Winlog Lite and I will go for the unlocked version shortly.
I'm going crazy, have you got any suggestion you can share with me to address these difficulties?
Cheers

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: Min Max Numgate save

Postby admin » Thu Jun 25, 2015 9:33 am

Hi!
I created a simple demo that's right for you. Try it and tell me if that's what you're looking for.

Regards
Attachments
Demo_Min_Max.zip
(11.06 KiB) Downloaded 146 times

bctBCT76
Posts: 23
Joined: Wed Jun 24, 2015 11:39 am

Re: Min Max Numgate save

Postby bctBCT76 » Thu Jun 25, 2015 1:33 pm

Thanks I will let you know, is it possible to keep values for a certain number of hours?

Let me better explain: I'd like to monitor min and max temperature measured during last 3 hours (or 24 hours), would that be possible?
The project will run continuously for many days, normally all winter season as it is an house temp control

Cheers

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: Min Max Numgate save

Postby admin » Fri Jun 26, 2015 7:54 am

Hi, you are free to use Chart and HistView object to consult historical data of any day. For example in the chart object click on the "Time Axis" button, it will open a dialogbox for set date and time from which to see the historical trend.

Regards

bctBCT76
Posts: 23
Joined: Wed Jun 24, 2015 11:39 am

Re: Min Max Numgate save

Postby bctBCT76 » Fri Jun 26, 2015 8:06 am

Thanks, anyway I don't think your demo is what I was looking for.

I want to monitor only one temperature I called it "T_tav" and I would like to have a simple label reporting the max value "Tmaxtav" reached and another label reporting the minimum temperature "Tmintav".
Your file seems to monitor 2 temperatures and create a plot.

Thanks

User avatar
admin
Site Admin
Posts: 322
Joined: Tue Nov 17, 2009 1:18 pm

Re: Min Max Numgate save

Postby admin » Fri Jun 26, 2015 8:15 am

Hi,
my demo is just to show you how to use code to do this type of operation. You are free to modify the code and set the appearance of the template according to your needs.
You have made some attempts? if you upload here your project we can help you.

Regards

bctBCT76
Posts: 23
Joined: Wed Jun 24, 2015 11:39 am

Re: Min Max Numgate save

Postby bctBCT76 » Fri Jun 26, 2015 9:44 am

Yes :-) I made it, I like it, I will post another post on another topics.

Thanks for your valuable help


Return to “Code - Code Builder”

Who is online

Users browsing this forum: No registered users and 1 guest