Results 1 to 14 of 14

Thread: Simple optical sensor programming issue

  1. #1
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88

    Simple optical sensor programming issue

    Ok -I am sure I am missing something fundamental here -below is program code for a tunze ATO which I will probably change now that I have a back up sensor but ...with line 3 it keeps giving me an error.


    Essentially I have it so that if the other tunze floater fails to respond immediately the optical sensor will essentially turn off the tunze. I will have it so that it will also stop auto water changes too.

    Advice appreciated

    Thanks
    LB

    Fallback OFF
    Set OFF
    If Swx7_1=CLOSED Then OFF
    If Time 01:00 to 01:15 Then ON
    If Time 03:00 to 03:15 Then ON
    If Time 05:00 to 05:15 Then ON
    If Time 07:00 to 07:15 Then ON
    If Time 16:00 to 16:15 Then ON
    If Time 19:00 to 19:15 Then ON
    If Time 21:00 to 21:15 Then ON
    If Output RetPump_2_3 = OFF Then OFF





    Sent from my iPhone using Tapatalk

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    You want this

    Fallback OFF
    OSC 060:00/015:00/105:00 Then ON
    If Output RetPump_2_3 = OFF Then OFF
    If Swx7_1 CLOSED Then OFF

    I would also suggest renaming the sensor to something meaningful.

    Sent from my SM-G965U using Tapatalk

  3. #3
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    Many thanks-can you explain the osc statement?


    Sent from my iPhone using Tapatalk

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by Faulker's Maze View Post
    Many thanks-can you explain the osc statement?


    Sent from my iPhone using Tapatalk
    It's a simpler way to do the pattern you were trying to do with time statements. It runs for 15 minutes every 3 hours starting at 1am.

    Sent from my SM-G965U using Tapatalk

  5. #5
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    Ok thanks- that’s definitely cleaner code!
    Only issue I have is that from the hours of 8-4 it needs to be off as my wife is in the office near the fish tank and the sudden sounds of water and beeping (especially if the tunze alarm goes off) bothers her.

    Also if we have guests I also need to turn it off as well at night-one reason I have all those time periods.


    Not sure if I can combine osc with a time frame? (And comment out code when guests are here)

    Thanks again
    LB




    Sent from my iPhone using Tapatalk

  6. #6
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    This would solve both problems and is a bit cleaner (changed to every 2 hours to better account for evap after a long stop). You can temporarily disable when guests are over by setting the Guest outlet to AUTO. You can enable the ATO back again by setting the Guests outlet to OFF and it will automatically shut off after 3 hours if you forget. You can also set the OSC to a shorter time (just below the timeout of the tunze) to prevent the alarm from going off from pump runtime timeout.

    ATO
    Fallback OFF
    OSC 060:00/015:00/045:00 Then ON
    If Time 08:00 to 15:59 Then OFF
    If Time 22:00 to 01:00 Then OFF
    If Output Guests = ON Then OFF
    If Output RetPump_2_3 = OFF Then OFF
    If Swx7_1 CLOSED Then OFF

    Guests (virtual outlet)
    Set ON
    When On > 180:00 Then OFF






    Sent from my SM-G965U using Tapatalk

  7. #7
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    Quote Originally Posted by zombie View Post
    This would solve both problems and is a bit cleaner (changed to every 2 hours to better account for evap after a long stop). You can temporarily disable when guests are over by setting the Guest outlet to AUTO. You can enable the ATO back again by setting the Guests outlet to OFF and it will automatically shut off after 3 hours if you forget. You can also set the OSC to a shorter time (just below the timeout of the tunze) to prevent the alarm from going off from pump runtime timeout.

    ATO
    Fallback OFF
    OSC 060:00/015:00/045:00 Then ON
    If Time 08:00 to 15:59 Then OFF
    If Time 22:00 to 01:00 Then OFF
    If Output Guests = ON Then OFF
    If Output RetPump_2_3 = OFF Then OFF
    If Swx7_1 CLOSED Then OFF

    Guests (virtual outlet)
    Set ON
    When On > 180:00 Then OFF






    Sent from my SM-G965U using Tapatalk
    Much obliged! Thank you.


    Sent from my iPhone using Tapatalk

  8. #8
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    Quote Originally Posted by zombie View Post
    This would solve both problems and is a bit cleaner (changed to every 2 hours to better account for evap after a long stop). You can temporarily disable when guests are over by setting the Guest outlet to AUTO. You can enable the ATO back again by setting the Guests outlet to OFF and it will automatically shut off after 3 hours if you forget. You can also set the OSC to a shorter time (just below the timeout of the tunze) to prevent the alarm from going off from pump runtime timeout.

    ATO
    Fallback OFF
    OSC 060:00/015:00/045:00 Then ON
    If Time 08:00 to 15:59 Then OFF
    If Time 22:00 to 01:00 Then OFF
    If Output Guests = ON Then OFF
    If Output RetPump_2_3 = OFF Then OFF
    If Swx7_1 CLOSED Then OFF

    Guests (virtual outlet)
    Set ON
    When On > 180:00 Then OFF






    Sent from my SM-G965U using Tapatalk
    Ok-another question-one of the issues cropping up is that its working-But then it starts/stops for a minute, then again and again until the cycle stops at 15 min til the next cycle begins again.



    I had attempted a defer statement such as defer 010:00 but the app saves it as defer 010:00 then off-is that right-it had seemed to have tripped up the OSC cycle.


    Is there a way if the sensor is closed to simply defer to the next cycle?


    (The time is ahead 3 hrs as I am in NY and not home in CA)

    Thanks again.






    Sent from my iPhone using Tapatalk

  9. #9
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Yeah. Add

    Defer 000:10 Then OFF
    Min Time 060:00 Then OFF

    Sent from my SM-G965U using Tapatalk

  10. #10
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    That works! Thanks again.
    LB


    Sent from my iPhone using Tapatalk

  11. #11
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    Ok zombie I am back. After a small enlightening conversation with tech support with tunze-I was duly informed that what many on here are probably doing -is mostly wrong (per tunze) in that it should operate as a stand alone and that constant on/off of the device may “fry” the controller.

    As such I am going to use the optical sensor as a tertiary safety just in case...

    As such I have it now programmed to be on unless the switch closes and then keep it off for 6 hours to allow the water to evaporate enough below the sump line.
    I’ll set the log function to see if it gets tripped often.


    I think the programming should work-

    Fallback OFF
    Set ON
    If Output RetPump_2_3 = OFF Then OFF
    If Swx7_1 CLOSED Then OFF
    Defer 000:10 Then OFF
    Min Time 240:00 Then OFF

    Thanks again.



    Sent from my iPhone using Tapatalk

  12. #12
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Its unnecessary to turn it off when your return turns off since water level will raise anyway.

    I must have skipped readin your description and went straight to your code when I provided my initial coding comments. Tunze is best used as standalone (or even better, steal the awesome pump from it and have the apex do your ATO with 2 or more floats/opticals).

    Sent from my SM-G965U using Tapatalk

  13. #13
    Frequent Visitor
    Join Date
    Aug 2017
    Location
    Pacific
    Posts
    88
    Quote Originally Posted by zombie View Post
    Its unnecessary to turn it off when your return turns off since water level will raise anyway.

    I must have skipped readin your description and went straight to your code when I provided my initial coding comments. Tunze is best used as standalone (or even better, steal the awesome pump from it and have the apex do your ATO with 2 or more floats/opticals).

    Sent from my SM-G965U using Tapatalk
    I have thought about that-any threads on how to do just that. Thanks.




    Sent from my iPhone using Tapatalk

  14. #14
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by Faulker's Maze View Post
    I have thought about that-any threads on how to do just that. Thanks.




    Sent from my iPhone using Tapatalk
    You just wire it to a 12V power supply. If you get a barrel adapter that is female power supply pin to screw terminals (just bring it into a RadioShack or similar and they can tell you the size) you can use the existing power supply and dont need to DIY anything. It will run at full speed.

    Sent from my SM-G965U using Tapatalk

Similar Threads

  1. Question: Optical sensor issue
    By karavak in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 2
    Last Post: 06-03-2020, 16:36
  2. Help! Help optical sensor programming
    By Tyler kieswetter in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 03-05-2019, 12:27
  3. Help! Issue with optical sensor on FMM
    By Satava in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 9
    Last Post: 11-29-2018, 11:21
  4. Question: Optical level sensor issue
    By inqztve in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 2
    Last Post: 09-16-2018, 15:18
  5. Review My Program Optical sensor programming
    By frank@wall in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 2
    Last Post: 05-22-2017, 18:02

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •