Results 1 to 4 of 4

Thread: Programing Question

  1. #1
    Frequent Visitor
    Join Date
    Apr 2016
    Location
    Naples, Florida
    Posts
    82

    Programing Question

    I have a external refugium being fed by a MJ1200. I have a "Refugs" which is a float switch that will turn the pump off if it get to high so it will not over flow. I then have it backed up with a Leak detector "Like_1" attached to my FFM. The problem is the coding is not working and it seems like I need an 'Or" statement. I can figure out how to do both.


    Fallback off
    Set Off
    If Refugs closed then off
    If Refugs Open then on
    If Leak_1 closed then off
    If Leak_1 open the on



    Last edited by Sppf121; 02-23-2018 at 07:51. Reason: Error

  2. #2
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Post programming questions in the most suitable programming-related sub-forum please. The Neptune Cafe is not one of them. I'll move this thread for you to the Miscellaneous Programming & Usage area.


    In the Apex, programming for an output is evaluated top to bottom, and the last TRUE statement determines the outcome of a output program and pouts the output in the state specified in that last true statement. The program you have is not right. The last two lines are in total control of the output, and the previous lines are totally ignored. You are over-complicating it by using If statements for the float switch and leak sensor to cover both possible conditions, e.g you are using both If Leak_1 CLOSED Then OFF and If Leak_1 OPEN Then ON; that is not needed and also makes your program not work right.

    In general, use a Set statement to define the default, normal state you want to the output to be in. Then add program statements which cover exceptions to that. In this case, the need is to have the outlet ON, unless the float switch is closed or the leak detector is wet (closed). This is all you need to do what you described:

    Set ON
    If Refugs CLOSED Then OFF
    If Leak_1 CLOSED Then OFF

    The outlet is now normally ON due to the Set ON, but will be shut off if the float switch is high or a leak is detected.

    Then we add in the desired Fallback state to get your final program:

    Fallback OFF
    Set ON
    If Refugs CLOSED Then OFF
    If Leak_1 CLOSED Then OFF

    I recommend that you read this sticky post to learn more about the proper use of Set and conditional ("If") statements: https://forum.neptunesystems.com/sho...l=1#post114462
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  3. #3
    Frequent Visitor
    Join Date
    Apr 2016
    Location
    Naples, Florida
    Posts
    82
    Thank you.

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Try this. Floats should be oriented up=OPEN if not already so if the float gets unplugged it shuts off. Try without the min time statement first to check that it works, then add it in after. That statement prevents the pump from turning on and off quickly right near the activation point for the float or leak sensor.


    Fallback off
    Set ON
    If Refugs OPEN Then OFF
    If Leak_1 CLOSED Then OFF
    Min Time 060:00 Then OFF



    You might be an engineer if...You have no life and can prove it mathematically.

Similar Threads

  1. New Apex Programing Question
    By yetman in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 06-06-2020, 18:14
  2. Review My Program Programing Question
    By Diddle in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 11-06-2018, 19:09
  3. Easy Question programing
    By seasurf in forum Misc Apex Usage & Programming
    Replies: 3
    Last Post: 09-22-2015, 18:21
  4. Question about programing DOS
    By Nemodan in forum DŌS & DDR – Dosing and Fluid Metering System
    Replies: 2
    Last Post: 09-04-2015, 10:11
  5. ozone programing question.
    By johnwin84 in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 01-07-2013, 23:52

Tags for this Thread

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
  •