Jump to content

Apex programming gurus for light intensities?


AlanM

Recommended Posts

I'm ready to start testing out my LED setup before I put on the lenses so I can correct any issues I have so far without prying off any hot glue.  I have 6 channels/drivers, and I'm running them from the last 2 channels of variable ports on the base unit and 4 channels on a VDM. 

 

I've read the comprehensive manual and the manuals for the base unit and the VDM and browsed through the Apex forums, but am still having trouble getting my head around what I need to do. 

 

I know it somehow involves "outlets", "virtual outlets," and "profiles." What I want during this testing phase is to be able to turn the different channels on at 10%, 25%, 50%, 100%, one at a time to see that they work and nothing releases the magic smoke that makes it work.  Can someone give me an example of how to do this or a resource with good examples of what's possible?

 

I've also seen reference to someone who made virtual outlets that were programmed to do different lighting scenarios so running multiple different channels at different preset intensities to get a certain effect.  I'd eventually like to be able to do that. 

 

I was hoping that the Apex had some kind of sliderbar widget which would just let me vary intensities on the 0-10V ports, but it doesn't seem to do that. 

 

 

Link to comment
Share on other sites

How about the advanced programming example on page 5:

 

http://www.neptunesystems.com/wp-content/uploads/2013/01/VDM_manual.pdf

 

Basically you set the outlet to follow different profiles under given circumstances.

 

I usually program a profile first and name it something like DayWhite and set the lighting parameters (40%, 0 ramp up/down, for example) and then under the VDM outlet put If Time 15:00 to 21:00 Then DayWhite.

 

I'm not sure if that helps...

Link to comment
Share on other sites

(edited)

How about the advanced programming example on page 5:

 

http://www.neptunesystems.com/wp-content/uploads/2013/01/VDM_manual.pdf

 

Basically you set the outlet to follow different profiles under given circumstances.

 

I usually program a profile first and name it something like DayWhite and set the lighting parameters (40%, 0 ramp up/down, for example) and then under the VDM outlet put If Time 15:00 to 21:00 Then DayWhite.

 

I'm not sure if that helps...

Those examples are for an AI Sol, unfortunately.  See how they are marked as <BluLED_X_5> and <WhtLED_X_6>, or ports 5 and 6 on the VDM which actually only has 4 variable voltage outputs.  Turns out the VDM has special controls for AI Sol and Acan Prism and such lights which are on channels 5 and 6 somehow. 

 

I don't know why the only advanced example they give was for a proprietary interface to a single manufacturer's light protocol, but I wasn't sure if those commands applied in general to lights where I just care about getting 3V or 5V or 7.5V etc when I want it from that output...

 

Edit:  By the way, the advanced pump example in there is for Vortech, I just saw.  Also an example for proprietary hardware.  Sheesh.

Edited by AlanM
Link to comment
Share on other sites

I just reread your post. If it's programming, I can help a little, but if it's how to interface a DIY LED from scratch, that's way over my head, LOL.

Link to comment
Share on other sites

very doable.  I don't have examples in front of me.  Check out neptunes forum/reefcentral.  You will use the profiles to tie your lighting intensity to the actual outlets.  You can also create virtual outlets that would be tied to your actual outlets. 

Link to comment
Share on other sites

I just realized that my post was not pertinent to you... I have seen people control DIY LED kits over at ReefCentral but I think it depends on the input parameters of your device and how you are triggering. If no one else here chimes in, could you try the Neptune Systems forums?

Link to comment
Share on other sites

I just reread your post. If it's programming, I can help a little, but if it's how to interface a DIY LED from scratch, that's way over my head, LOL.

Just programming, I think.  I have the 0-10V output ports going to some Steves LEDs Aquarium Controller interfaces translating 0-10V into 0-100% duty cycle PWM and using that to drive some Meanwell LDD PWM input pins.  I've wired the LED strings to the LDD outputs and am ready to plug the beast in, but want to make sure I can control intensities from my computer first.  I might even hook up a scope to see if I'm getting the PWM output that I expect before risking my LEDs.

Link to comment
Share on other sites

very doable.  I don't have examples in front of me.  Check out neptunes forum/reefcentral.  You will use the profiles to tie your lighting intensity to the actual outlets.  You can also create virtual outlets that would be tied to your actual outlets. 

Scott!  I recognize your username now.  I remember you posting a while ago offering help with Apex programming, but couldn't remember it when I was asking the question.  I plan to read the Apex forums and dig for examples there.  It kind of seems like once I get my head around what outlets, virtual outlets, and profiles are I should be good to just make them up.  The reference material I've found so far is way short of being a real API on how to use these things. 

 

Is there a comprehensive command and variable name reference somewhere?  Seems like the docs they have are ok, they just need a good programming reference instead of sticking an example or two into the manuals for their modules.

Link to comment
Share on other sites

OK.  So I'm spamming my own thread, but even the community developed "Comprehensive" reference manual on page 40 gives a list of variables you can test for, but doesn't actually give the variable names, just the descriptions.  Neptune Systems seriously needs someone to run javadoc or something to generate some API documentation.

Link to comment
Share on other sites

What exactly do you want it to do? If you can describe it in plain English, maybe we can translate it into Apex-ese (assuming that your 0-10V interface is communicating correctly with the VDM).

Link to comment
Share on other sites

Ok, I'm assuming you have an LED driver that has a 0V-10V DC variable input to control dimming.  Here is what I did for mine:

 

 

Step 1: Create a profile on the Apex.  Use control type of “Ramp”.  Give it a name, specify a duration (ramp time), beginning intensity (0%) and ending intensity (25%)

 

Step 2: Program the Variable output outlet.  Use the control type of “Advanced”.  You’ll get a place to enter the programming.  Mine looks like this:

 

Fallback OFF

Set OFF

If Time 15:30 to 23:59 Then RampUpB

If Time 23:59 to 00:30 Then RampD-B

If Temp > 83.0 Then OFF

Min Time 030:00 Then OFF

 

 

Interpretation: from 15:30 to 23:59, it will run the RampUpB profile.  That profile ramps from 0% to 100% over 30 minutes.  This means after 30 minutes (16:00) it will be at 100%.  For the rest of the time it stays at 100%.  Don’t get confused and think the ramp duration goes from 15:30 to 23:59.  It stays at the 30 minutes as specified in the profile

 

From 23:59 to 00:30, it runs the RampD-B profile which ramps things down from 100% to 0% over 30 minutes.  As per the last comment, I could have had the end time after 00:30 and gotten the same effect.

 

Considerations:

 

1)   I don’t really use 0% but 2% instead.  I found that my drivers need a little bit of DC signal voltage otherwise they flicker and do weird things.

2)   The above only applies to the programming the Variable outputs.  You still need to have the POWER on for the actual AC electrical outlet.  That means the outlet on the EB8 needs to be programmed by the Apex to be ON/OFF at the correct time.  Otherwise the drivers will have DC voltage to the dimmer signal but no AC voltage.

Link to comment
Share on other sites

just read the posts created while I was typing.  Looks like you have PWM drivers but you have a DC-PWM converter between them.  So almost all of the above is still valid.  You just connect the Variable outputs on the Apex to the DC-PWM converter.  You can probably get away with 0% in the profile as the floor.

Link to comment
Share on other sites

What exactly do you want it to do? If you can describe it in plain English, maybe we can translate it into Apex-ese (assuming that your 0-10V interface is communicating correctly with the VDM).

Thanks. 

 

I renamed base_Var3 as RoyalBlue and base_Var4 as NeutralWhite.  I have the outlets set to Advanced, and they currently have the following in their text field:

 

Fallback OFF

Set OFF

If Time 08:00 to 20:00 Then ON

If Temp > 82.0 Then OFF

Min Time 030:00 Then OFF

 

What would I need to do in order to get a button that would let me turn the two of them on at 10% and at 25% (1V and 2.5V) for continuity testing?  I kind of get what they're doing in the default program I posted above.

Link to comment
Share on other sites

DaveS,

 

So you have to use profiles to control intensities, right?  You can't have an "If Time then 25%" in the outlet config?

 

Seems like if that's the case, then I'll want a profile with an immediate ramp up to 25% intensity and have an virtual outlet configured that says something like "If you're on, then tell RoyalBlue to use the profiles that ramps immediately to 25%"

 

Can I set the ramp time to 0 minutes, the start intensity to 0 and the end intensity to 25?  Are fractional minutes acceptable?

Link to comment
Share on other sites

You need to define an advanced profile like TenPercent and set the max intensity at 10% and

In the outlet say

 

If Time 08:00 to 20:00 Then Ten Percent

Link to comment
Share on other sites

profiles to control intensities- correct.

 

Can't have "If time then 25%"- correct.

 

In your code 2 posts ago you need to change:

 

If Time 08:00 to 20:00 Then <insert profile name here>

 

You can have ramp times of 1 minute, maybe less (patience grasshopper). :tongue:

 

You can also manually turn the Varible outlet on which then eliminates having to wait for the time of day to occur.

Link to comment
Share on other sites

Dave, if you turn on the outlet manually via the dashboard, is there anyway for it to default to a certain profile? Mine just seems to go to max (sorry about the hijack).

Link to comment
Share on other sites

Dave, if you turn on the outlet manually via the dashboard, is there anyway for it to default to a certain profile? Mine just seems to go to max (sorry about the hijack).

No hijack.  That was exactly my followup question.

Link to comment
Share on other sites

What you would be turning on from the dashboard is the Variable output.  That output is programmed by you to use a specific profile.  If you want to switch between 25%, 50%, 75%, etc, you would do as you Shoelace suggested and pre-create those profiles:

 

25percent

50percent

75percent

 

You would then edit the programming for the Variable output to use the appropriate profile for your test. 

Link to comment
Share on other sites

What you would be turning on from the dashboard is the Variable output.  That output is programmed by you to use a specific profile.  If you want to switch between 25%, 50%, 75%, etc, you would do as you Shoelace suggested and pre-create those profiles:

 

25percent

50percent

75percent

 

You would then edit the programming for the Variable output to use the appropriate profile for your test. 

OK.  So you'd say something like the following in your Variable outlet Advanced program?

 

Set Off

If On then 25percent

Link to comment
Share on other sites

Playing with it now, and here's what I did so far:

 

- Added a DC8 module to give me some virtual outlets to play with

- Renamed the first of those outlets (which Apex calls Cntl_A1) to LightsAt10

- Renamed the second of those outlets (which Apex calls Cntl_A2) to LightsAt25

- Put the following into the program for the LightsAt10 and LightsAt25 outlets:

Fallback OFF
Set OFF

- Renamed profile PF1 to LED_0.10 and put the following in it:

Control Type: Ramp

Ramp Time: 0

Start Intensity: 0

End Intensity: 10

- Renamed profile PF2 to LED_0.25 and put the following into it:

Control Type: Ramp

Ramp Time: 0

Start Intensity: 0

End Intensity: 25

- In my RoyalBlue variable outlet (which Apex calls base_Var3) I put the following program:

Set OFF
If Outlet LightsAt10 = ON Then LED_0.10

If Outlet LightsAt25 = ON Then LED_0.25

- In my NeutralWhite variable outlet (which Apex calls base_Var4) I put the same program:

Set OFF
If Outlet LightsAt10 = ON Then LED_0.10

If Outlet LightsAt25 = ON Then LED_0.25

and similar for the other 4 variable outlets

 

 

Am I on the right track here?  Seems like this should give me switches I can just turn on to get to fixed intensities across all channels if I put that into each variable outlet.

Link to comment
Share on other sites

I'm confused about the DC8s.  Aren't they just plugs for the LED driver to plug into?  I'm guessing so as that's all they can be.  It's looks like you have programming of the Variable outlets that tie into the DC8s. 

 

 

If Outlet LightsAt10 = ON Then LED_0.10

 

I'm not an Apex guru but this doesn't make sense to me.  The DC8s are outputs, not inputs so I don't think you can apply logic based on them.  inputs are things like Time, temp, ph, etc.  DC8s are just power outlets with an controllable on/off state.  Instead of the commands you have there for the variable outlets try

 

If Time 08:00 to 20:00 Then Then LED_0.10

 

change the time to 1 minute before you are ready.

 

 

Better yet- since there seems to be confusion about the Variable outlets and the AC outlets, get a Voltmeter and connect it to the Variable outlet wires.  Take the DC8 and everything else out of the equation.  Just figure out how to program it so you get 0-10V DC.  Then layer in the AC power.

Link to comment
Share on other sites

It seems to make sense. What I am not sure of is if you can run the same profile for different outlets simultaneously or if you would have to have both a blueLED_0.10 and a whiteLED_0.10. I don't know the answer but it would be something to look out for if things act funny.

Link to comment
Share on other sites

in your above example you did not set a ramp time (seconds) or starting intensity.  Also 10% intensity is very low.  You will have to play with the intensity.   When do your actual lights come on?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...