Firefly Posted September 6, 2011 Share Posted September 6, 2011 Hi- I have a UE9 Pro running with DAQFactory 5.40, which I'm new to. I've got 4 analogue inputs which I'm displaying successfully on screen to display the current watts produced by a generator. I'd like to total the 4 inputs and display the cumulative watt/hour total on-screen with a reset button to zero this total. I found this post which looks like it does half of what I'm looking for, but the total seems to be counting up and down, which can't be right?! http://www.azeotech.com/board/index.php?sh...ost&p=12449 As a starting point I tried displaying the watts from one channel. I'm using sum(Bike1[floor(systime()/86400)*86400, systime()]) (where Bike1 is the channel's name) Could anyone shed any light on this for me? Thanks Link to comment Share on other sites More sharing options...
AzeoTech Posted September 6, 2011 Share Posted September 6, 2011 If the total is going between -1 and 1, then likely you forgot to set the Timing to 0 when you created your Test channel. In general the steps are: 1) create a Test A to D channel with Timing = 0. Make sure the Channel # is unique for each Test channel you create. For these instructions, I'll call it "total" 2) in an autostart sequence initialize "total" to 0: total.addvalue(0) 3) in the Event for the channel you wish to totalize, put: total.addValue(bike1[0] + total[0]) 4) to reset, simply set total to 0 the same way you did in step 2. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.