PDA

View Full Version : Apex Virtual Outlet vs. individual commands


mpderksen
12/24/2014, 10:10 AM
I think I'm starting to understand the programming here, but there is a gap for me in the difference between a virtual outlet vs adding lines to each outlet for an event.

Here's what I'm trying to do: when I want to take photos, I want the main pump off (and therefore the skimmer so it doesn't overflow). I want my White LEDs to go to 100%, and Blues at 50% (since this is how I've calibrated my cameras white balance).
It seems that I could go into each of the 4 outlets, and add a line that says, "if Feedb 000 = ON then OFF". (Not sure I have that right).

Alternatively could I create a Virtual Outlet called "photo", link it to Feedb, and put a list of commands there like, "if Feedb then EB_2 = off" adding one line for each of the 4 EB outlets?

Obviously I have the code wrong, but I'm trying to understand how to use virtual outlets to create events that trigger multiple outlet events. Or it you just add a line to each outlet. Maybe both are possible and I'm not clear which makes the most sense.

doctorwhoreefer
12/24/2014, 10:16 AM
From my understanding so far, think of a virtual outlet as a mini app.
It's not hardwired to an actual outlet, so you can use it more as a relay than an object?
If that makes sense...
So maybe for yours:
link the testvo to feedb
if outlet testvo = on then etc

or set to a time, when testvo turns on, turn on or off pumps, change lights, and perhaps a 'finishedtakingpicture' vo that is set to turn everything back to normal 1 minute after the other vo is off

I'm still pretty new to the programming but it's my strong suit. Check out the neptune forums for some examples too, pretty slick crowd there too.

slief
12/24/2014, 10:50 AM
No real need to even link to a feed timer although the timer method would allow you to use the display to activate the sequence by the push of a button and have it timed.

You could also create a virtual outlet called Photo.
All it would need is
Fallback OFF
Set OFF

In your pump outlet you would add a line that says:
If Outlet Photo = ON Then OFF

You then create a profile called Photo_Light for the lights that sets your lights to 100%.
In your variable speed outlet you would add a line that says.
If Outlet Photo = ON Then Photo_Light

This would require you to toggle the virtual Photo Outlet to manual on to shut the pump down and brighten the lights. Then turn the outlet off when you are done. You can trurn the outlet on from the native web interface, the Apex App or even Fusion.

mpderksen
12/24/2014, 12:42 PM
No real need to even link to a feed timer although the timer method would allow you to use the display to activate the sequence by the push of a button and have it timed.

You could also create a virtual outlet called Photo.
All it would need is
Fallback OFF
Set OFF

In your pump outlet you would add a line that says:
If Outlet Photo = ON Then OFF

You then create a profile called Photo_Light for the lights that sets your lights to 100%.
In your variable speed outlet you would add a line that says.
If Outlet Photo = ON Then Photo_Light

This would require you to toggle the virtual Photo Outlet to manual on to shut the pump down and brighten the lights. Then turn the outlet off when you are done. You can trurn the outlet on from the native web interface, the Apex App or even Fusion.

I'm starting to understand, so thanks for the patience and clear explanations.
So a "profile" is used for things that are controlled by the 1-10V connection, like my LED intensity? Since the MeanWell drivers are plugged into a non-controlled power strip, I can't kill them directly. But rather by setting each to 0V.
Could I, instead of the line in the pump code itself, put a line that triggers the pump to off and just activate that VO from the app?
Something like:
Virtual Outlet Photo
Fallback OFF
If Outlet Photo = ON then EB_2 OFF
If Outlet Photo = ON then EB_3 OFF
If Outlet Photo = ON then Photo_Light
Set OFF

Where EB_2 and EB_3 are pump and skimmer respectively. The reason I would do this is to keep the code for the skimmer and stuff as simple as possible so I don't forget something.

slief
12/24/2014, 01:01 PM
I'm starting to understand, so thanks for the patience and clear explanations.
So a "profile" is used for things that are controlled by the 1-10V connection, like my LED intensity? Since the MeanWell drivers are plugged into a non-controlled power strip, I can't kill them directly. But rather by setting each to 0V.
Could I, instead of the line in the pump code itself, put a line that triggers the pump to off and just activate that VO from the app?
Something like:
Virtual Outlet Photo
Fallback OFF
If Outlet Photo = ON then EB_2 OFF
If Outlet Photo = ON then EB_3 OFF
If Outlet Photo = ON then Photo_Light
Set OFF

Where EB_2 and EB_3 are pump and skimmer respectively. The reason I would do this is to keep the code for the skimmer and stuff as simple as possible so I don't forget something.

Yes, profiles are variable speed outlets and create settings for things like your lights and or 0-10v controlled pumps.

I don't think your above idea will work. The code would need to be in the corresponding outlet itself and not the virtual outlet.
Here is a link to all my Apex programming. It's complicated but if you stare at it long enough, you will probably figure out what it's doing. This includes physical outlets on the EB8's and EB4's, virtual outlets, switches on my break out box, profiles etc.
http://www.reeftronics.net/programns.php?member=scottl

You might consider registering at the Official Neptune forum. There is a lot of great info there and also plenty of additional experts that monitor that forum all the time.
https://forum.neptunesystems.com/forum.php

I'd also suggest downloading and reading the Comprehensive Apex Manual. There is a lot of great info in that manual with lots of programming examples and explanations to better help you with your programming. You can download the manual here:
https://www.neptunesystems.com/downloads/docs/Comprehensive_Reference_Manual.pdf

mpderksen
12/24/2014, 03:50 PM
Yes, profiles are variable speed outlets and create settings for things like your lights and or 0-10v controlled pumps.

I don't think your above idea will work. The code would need to be in the corresponding outlet itself and not the virtual outlet.
Here is a link to all my Apex programming. It's complicated but if you stare at it long enough, you will probably figure out what it's doing. This includes physical outlets on the EB8's and EB4's, virtual outlets, switches on my break out box, profiles etc.
http://www.reeftronics.net/programns.php?member=scottl

You might consider registering at the Official Neptune forum. There is a lot of great info there and also plenty of additional experts that monitor that forum all the time.
https://forum.neptunesystems.com/forum.php

I'd also suggest downloading and reading the Comprehensive Apex Manual. There is a lot of great info in that manual with lots of programming examples and explanations to better help you with your programming. You can download the manual here:
https://www.neptunesystems.com/downloads/docs/Comprehensive_Reference_Manual.pdf

Thanks again. I did post a little there and got immediate information, so you're right.
I'll look over your examples. I used to code Perl, so I understand syntax and event orders. I just need to get a handle on the formats.

slief
12/24/2014, 04:52 PM
Thanks again. I did post a little there and got immediate information, so you're right.
I'll look over your examples. I used to code Perl, so I understand syntax and event orders. I just need to get a handle on the formats.

Glad to help! Once you figure it out and get a grip on the logic, it's pretty straight forward. Since you have some programming background, that should make it even easier. Given your past experience, my programming will probably make a fair amount of sense to you. There is an awful lot you can do with the Apex as you will probably see when you look at my programming. I happen to have a very extensive Apex system with a lot of code so if you can disseminate the stuff that relates to your planned setup, it should be of great use to you. Plus you can copy and paste from that link which can be very helpful. I think you are on the right track!

mpderksen
12/24/2014, 11:41 PM
Glad to help! Once you figure it out and get a grip on the logic, it's pretty straight forward. Since you have some programming background, that should make it even easier. Given your past experience, my programming will probably make a fair amount of sense to you. There is an awful lot you can do with the Apex as you will probably see when you look at my programming. I happen to have a very extensive Apex system with a lot of code so if you can disseminate the stuff that relates to your planned setup, it should be of great use to you. Plus you can copy and paste from that link which can be very helpful. I think you are on the right track!

Wonderful. I did find your site, but not the programming link. The one you posted above didn't link correctly in my iPad.
Your code does make a lot of sense. But it seems, like in Perl, there are several ways to do the same thing. Mood programming is efficient and easy to troubleshoot. That's why I would prefer to have an event code all in the same place, rather than spread over multiple outlets.

slief
12/25/2014, 09:20 AM
Wonderful. I did find your site, but not the programming link. The one you posted above didn't link correctly in my iPad.
Your code does make a lot of sense. But it seems, like in Perl, there are several ways to do the same thing. Mood programming is efficient and easy to troubleshoot. That's why I would prefer to have an event code all in the same place, rather than spread over multiple outlets.

Interesting that the programming link doesn't work for you. It works fine for me on my ipad. I just tap it and it opens the link in a new browser. I assume you were able to get to the programming on your own through Reeftronics.net? That site is a great tool too. You should register your Apex there once you get it all setup. You do need to have your port forwarding setup and dynamic DNS setup if your ISP doesn't provide you with a static IP for your routers external address.
Reeftronics will automatically notify you if it it can't communicate with your Apex. It also has some great graphs, webcam link and of course the entire program list which is convenient to copy and paste and make a hard copy backup. If you dig around there, you can go to Scottl and check out the options of what can be displayed. It's not a replacement for the Apex web gui, app or Fusion but it is useful.

mpderksen
12/25/2014, 10:06 AM
Found the problem. I'm using Tapatalk on the iPad, and I get these spinning gears forever.
301455
On Safari I get the same gears, but then it resolved to the code list. Thanks for this. For me, nothing helps more than examples.

Merry Christmas.

Michael

slief
12/25/2014, 10:24 AM
Found the problem. I'm using Tapatalk on the iPad, and I get these spinning gears forever.
301455
On Safari I get the same gears, but then it resolved to the code list. Thanks for this. For me, nothing helps more than examples.

Merry Christmas.

Michael

Glad to help. I never use Tapatalk. I have the app but prefer using the web browser. Chrome in particular on my iPad. i use a Zag keyboard cover which has completely transformed my iPad into essentially a small laptop. One of the best things I ever got for my tablet. Now when I travel, I never bring my laptap and rarely if ever use my hope computer anymore unless I need to update my Apex or use iTunes on my iPhone or Ipad.

mpderksen
12/25/2014, 11:01 AM
Glad to help. I never use Tapatalk. I have the app but prefer using the web browser. Chrome in particular on my iPad. i use a Zag keyboard cover which has completely transformed my iPad into essentially a small laptop. One of the best things I ever got for my tablet. Now when I travel, I never bring my laptap and rarely if ever use my hope computer anymore unless I need to update my Apex or use iTunes on my iPhone or Ipad.

First thing that catches my attention is the use of profiles. The only thing that I could use it for is if I upgraded my MP10 to wireless. (My LEDs are a Rapidled fixture, so I don't think that would apply).
My next big goal is to get my dosing pumps dialed in.