PDA

View Full Version : Testing an outlet state for profile?


vbsaltydog
08/16/2012, 04:51 PM
Is there a way to test an outlet for its profile state vs just the ON/OFF states?

If not, is there a way to test if a profile is running?

Thanks,

-Steve

swearint
08/16/2012, 05:44 PM
It does not appear so. I just tested it and it returns an error indicating ON/OFF is expected when using the If Outlet... command. However, the active profile does appear on the status page for the VSPorts.

Todd

vbsaltydog
08/16/2012, 06:01 PM
Yes, I know. Thats why I am asking if there is another way to test for it.

RussM
08/16/2012, 09:39 PM
Dunno if this will help with whatever you are attempting to do...

The If Outlet statement will "see" an outlet as being ON if a profile is active on ZYX.

In other words, the If Outlet statement "sees" an outlet simply as being either OFF or NOT OFF.

vbsaltydog
08/16/2012, 09:47 PM
Thanks but that doesn't help. I need to test the outlet's state for on/off/profileX/profileY

RussM
08/16/2012, 09:58 PM
I'm curious... why?

vbsaltydog
08/16/2012, 10:06 PM
Well, I can imagine lots of reasons why it would be useful to see an outlet's profile state but in this particular scenario I am using the VDM and two Tunzes to create tidal swells like in nature. One pump generates a wave while the other provides random flow that gets progressively stronger over a six hour period and then the pump roles reverse so there are two high tides and two low tides every day and the current switches direction to simulate incoming/outgoing tides. It is working well but I could improve it with outlet testing for profile states.

aquamanic
08/17/2012, 09:55 AM
could you make some virtual outlets, one for each profile you want to use? Then use those virtual outlets to trigger the physical outlet on/off/profile. You can then use the 'if outlet..' command like Russ was suggesting to know if a virtual outlet i.e. profile was on or not.

vbsaltydog
08/17/2012, 01:42 PM
Yes, I can create VOs for profileX and profileY and then flip the corresponding VO on when I set an outlet to a profile but what a PITA/hack.

As useful as the APEX is, there is a lot to be desired from the firmware. Properly testing for an outlet's state, control structures like if/else and foreach, variables, and commenting would make the APEX infinitely more useful.

If on board space for the suggested features is the problem, then an SD card would solve that.

Thanks for the suggestions.