PaulTurner911 Code

Share you PDE file with our community
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Actually you have to add 200 to that... so it would be 338
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

OK. I added 200 to it and read 338.
That read as 50 (which is the Speed that I set in the Portal.
So I read 339 which 30 and that is the duration I have set in the Portal.

So as a test I changed the duration in the Portal to something that I would not have set anywhere else "23", saved it and then re-read the 330 location and it read as 23.

So the value I set in the Portal is getting stored in the Internal Memory in the correct location.

I have no idea why it is reading as 0 in the DC Pump section of the Portal.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

Actually I just looked again and the DC Pump section of the Portal is now showing the correct speed and it is giving me the proper layout of the portal at the moment.

Very strange???
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Because if your set to UseMemory=false the variables are not loaded. Thats why we forced it with the line I asked you to add. If you haven't loaded that code then DCPump.Duration will be 0. With the line I asked you to add it will set it to whats in the memory location. Have you loaded that code yet? and you're still getting 0?

Just saw your update... if you are not in Custom mode then UseMemory will be true and it will read memory each ReefAngel.ShowInterface(). If you did load the new code then we forced it to read from memory.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

Yes I loaded that code you had me put in earlier today.

It is set to Custom on the Portal and the mode it randomly choose after the reboot of the updated code was Lagoon so that is what it is reading in the DC Pump section now.

When I get home I'm going to upload the code again with only ShortPulse or LongPulse as the choices so I can see if both pumps are running.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Ok. I think you'll be ok. especially since the duration is now showing in the portal. You can also confirm it by readin the r99 data and looking at DCD
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

I think that new line of code did it.
I just uploaded it and I can see that it is switching between the WP-40 and WP-25 on Long Pulse in the Portal and on my phone.

I'll double check the actual pumps when I get home.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Cool.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

Yeah it looks like both pumps are working.
On the Long Pulse what would the duration represent Min?
When I got home I think a caught the tail end of one pump and now the WP-40 has been on since I got home (about 14 min).
The duration is set to 30.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

I thought it was seconds...
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

It is seconds. I guess I was missing the switch before.
I just timed it.

All looks to be good.
You did it again man.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

Lee;

The Random mode has been working great.
I think it went to the Else Mode today and the reason I say that is about a week ago I norticed it had never done the Else mode, so I made that the only choice in the modes to choose from.

When the unit re-started I looked at the portal to see what mode it said it was in and it read 30%, with no mode listed, but I had every option showing on the portal again like I did before.

Image

Image

Any ideas?

I could live with this if need be.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Change the mode to something else. Then save. Then put back to custom.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

I did try that last night from my phone while I was at my sons baseball game. When I set it back to custom the portal interface did not change. It only changed at 9pm when it went into the 30% constant night flow, which it is still in now. I'll see what happens at noon when it picks the next random mode.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

I think it's similar to the issue we had before where the DCPump settings don't get set because we see memory is set for custom mode so we are always in UseMemory=false;

What would be helpful would be to reboot the controller later and see what DCS, DCM, and DCD are set to from the /r99 output. If any are 255 then yeah its the same issue and I can look at at better method then what we did last time...
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

I've set the code to only have the Else mode as an option and them I checked the r99 out up and there is no 255 in the DCS, DCM and DCD.

They are actually set to the setting I have in portal.

<DCM>16</DCM>
<DCS>50</DCS>
<DCD>30</DCD>

The 16 for DCM is what the Else mode is defined as in the code...

// Add Else Mode definition..
const int Else=16;

In addition I added the ReefAngel.DCPump.UseMemory=false; to the code and the Portal is still messed up.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

And your still getting issues in the portal? I meant set it back to custom then reboot ra then check r99..
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

Yes. If I remove all the choices from the available modes list except for Else, have it in custom on the portal and upload the code it will reboot in Else mode and the portal will be wacked.

If I check the r99 output it will show...
<DCM>16</DCM>
<DCS>50</DCS>
<DCD>30</DCD>

When I add all the choices back in it will re-boot with what ever (this time it was ReefCrest) and the portal will be correct.

I don't want to hi-jack this thread with this, should I start another thread?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PaulTurner911 Code

Post by rimai »

There is no such mode 16
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

It was defined in the code..

// Add Else Mode definition..
const int Else=16;

I'm not sure if Lee defined that or it was in Collin's original code.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PaulTurner911 Code

Post by rimai »

Ahh. Sorry
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

No problem
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Roberto could that be screwing with the portal though?

The mode should show 11 since its part of our custom mode.

This could be part of the issue...
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PaulTurner911 Code

Post by rimai »

Yeah... I think so.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PaulTurner911 Code

Post by lnevo »

Do you think it would be better to fix it on the backend? I mean if someone didn't initialize memory they would have the 255 issue we saw earlier? Either way I can fix in the INO. Steve, can you update your thread with latest version if its not already?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

It is updated with the current version.
Paulturner911
Posts: 288
Joined: Wed Jan 23, 2013 12:36 pm

Re: PaulTurner911 Code

Post by Paulturner911 »

Is there anyway to test the WP pump (I trashed the controller day 1), mines not running. Gotta be a way....

It would happen ever once and a while with my current code on random, but I could power cycle and all was well. No longer the case, she unresponsive. I went to the portal and changed the mode, it reflects on the controllers screen. Ive checked all connections, the ac/dc trans for the WP, the power to Jebo adapter, adapter to the PWM, and adapter to the WP...TWICE.
But the pump isnt working.

Anyhelp in trouble shooting would be great. Thanks
Image
sabo
Posts: 129
Joined: Tue Sep 24, 2013 3:18 am

Re: PaulTurner911 Code

Post by sabo »

Tried cleaning the pump?
Paulturner911
Posts: 288
Joined: Wed Jan 23, 2013 12:36 pm

Re: PaulTurner911 Code

Post by Paulturner911 »

Yeah, I tore into it pretty good. Also, tried it with the factory controller someone let me use.
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PaulTurner911 Code

Post by Sacohen »

Paul;

PM me your address. I'll send you a spare I have if you promise to send it back.
You don't need the PS do you? I don't have a spare for that.

That brings up a question, you're sure you're getting power out of the PS.
Post Reply