Different settings for 2 different DC Pumps.

Requests for new functions or software apps
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Different settings for 2 different DC Pumps.

Post by rimai »

I noticed that too.
The high resolution may be messing with the rounding.
Roberto.
AlanM
Posts: 263
Joined: Wed Jan 01, 2014 7:26 am

Re: Different settings for 2 different DC Pumps.

Post by AlanM »

Yep. Probably some change I introduced for reporting the value set on the daylight and actinic channels. It multiplies by 2.55 to send the value to the port, but then divides by 2.55 to report it and I bet there's an integer truncation happening in the math that keeps it at 29 instead of 30 when it chops off 29.8 in to just 29.
AlanM
Posts: 263
Joined: Wed Jan 01, 2014 7:26 am

Re: Different settings for 2 different DC Pumps.

Post by AlanM »

Testing fix now. If it works. I'll send a pull request in to /dev. I realized that we used to divide by 2.55, now by 40.95, so it's more likely to be a round error.
AlanM
Posts: 263
Joined: Wed Jan 01, 2014 7:26 am

Re: Different settings for 2 different DC Pumps.

Post by AlanM »

OK. Think it's fixed. Submitted pull against /dev. I believe it was just a display error, not that it was actually at 29% when you asked for 30.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

I think it also may not actually update the channel speed so we may not see the offset..the best way to see if its working is by looking at the pumps..i'll have to check the functionality again tonight...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

The important thing about the patch too is whether or not its even setting sync/antisync right at all, because i updated the whole code that outputs to the channels. See if elsemode works as expected with offset set to 100
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

No, I'm wrong. It should update the anti-sync channel with the new offset speed. The time schedule should not affect it the way you have it written... confusing.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

Happy Labor Day all.
Sorry didn't really get to try anything yesterday.
Lee;

You want me to try Else Mode @ 100% offset?

Is that correct?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Yes i want to know if its behaving as expected. Then try for some offsets...it should be noticable i think if you went to 50 or 25 or 10 or even 0 from there...
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

Ok. I'll try it later. We're having a little Labor Day partyt today, so afterwards I'll try it.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

I'm having a labor day party too...it's called long postponed aquascaping day :D
AlanM
Posts: 263
Joined: Wed Jan 01, 2014 7:26 am

Re: Different settings for 2 different DC Pumps.

Post by AlanM »

For what it's worth, with my current version of /dev with the fix to pump speed reporting, I am now seeing 30 percent instead of 29 percent when things are set to 30, so it was integer truncation error.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Btw, there should be no reason the offset can't be greater than 100. Say you want it to be 125% you can go all the way to 255 :)
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

I tried else mode with 100% offset and it didn't seem right.
The daylight channel was physically off. I put my hand in the tank and there was no movement. All displays read 0.

The actinic was full throttle.
Displays read 193 and felt like more power then I ever felt out of the WP40.

Something wasn't right.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Hmm thats odd. Will need to do some checking...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Can you try some tests with constant too, may be better able to see what's going on.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

I'll try them tonight.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

I think I did try Constant Mode, but I'll try it again.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Just curious the results at diff speeds on constant and with a couple diff offsets. Would help to narrow down what I may have done wrong.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

Lee;

How can you have a value of over 100%?
you said in a previous post that you can enter up to 255.
Will that make the pump run faster then it should?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

The offset is divided by 100 and then multiplied by the speed.

So if speed is 50 and your offset is 125, the the new speed should be 50*(125/100) which would be 50*1.25 which would be 62.5%
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

The offset is applied before the threshold is applied so that should prevent it from getting set over 100. I'll review that though, I haven't looked at the PumpThreshold function.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

I added some parenthesis where I do the calculation. This should help. I really don't see any other reason why it wouldn't at this point. Let's see how you're test goes. If worse case scenario, I'll add a phantom DCPump set to my INO and see what happens :)
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

I added a constraint to PumpThreshold() to make sure it won't give a setting over 100% as well, just in case :)
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

OK. I downloaded and installed your new dev code.

I set the Internal Memory to Constant with a speed of 100.

Set the offset in my code to 30 and uploaded the code.

The offset did work, but it was applied to the Daylight Channel not the Actinic Channel.
I thought it was going to be applied to the Actinic channel.

Maybe I just assumed because that is the channel I need to run slower since that one is my WP-40 and the Daylight is my WP-25.

If you intended to effect the Daylight channel then it worked fine.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

I affect the AntiSync channel. The Sync channel isn't touched.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Code: Select all

ReefAngel.DCPump.ActinicChannel=Sync; // Now you're pump will be affected by the portal settings.
ReefAngel.DCPump.DaylightChannel=AntiSync; // Now you're pump will be affected by the portal settings.
Your Daylight channel is you AntiSync channel.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

It's all how you set it. You can flip it by making Actinic the Anti-Sync and the daylight the sync.

If you want to leave it as-is, you could change the wp-25 to a greater than 100 offset and set your speed according to the wp-40.

Let's say you set the speed to 40% and the offset to 150, then your wp-40 would be at 40% and you're wp-25 would be at 60%.

Does that make sense?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Different settings for 2 different DC Pumps.

Post by Sacohen »

Ok. I see.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Different settings for 2 different DC Pumps.

Post by lnevo »

Cool, so it's working! Roberto merged it into dev already. This next release is going to be awesome. So many new features.
Post Reply