Results 1 to 5 of 5

Thread: OSC Statements

  1. #1
    Frequent Visitor
    Join Date
    Mar 2013
    Location
    Corunna, Ontario, Canada
    Posts
    146

    OSC Statements

    Can I have multiple OSC statements in a program?
    I'm trying to OSC an outlet to control a pump for a sulfur denitrator, I'm trying to do this:

    Fallback OFF
    OSC 000:00/000:02/000:30 Then ON
    If Orp < 160 Then OFF
    If Orp > 180 Then OSC 000:00/000:04/000:10 Then ON
    If Orp > 190 Then ON

    Everything works except the second OSC statement.

    Thanks

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Multiple OSC statements require virtual outlets.

    OscORP1 (VO)
    OSC 000:00/000:04/000:10 Then ON
    If ORP > 180 Then OFF

    OscORP2 (VO)
    OSC 000:00/000:04/000:10 Then ON
    If ORP < 181 Then OFF

    Pump (physical outlet)
    Fallback OFF
    Set OFF
    If Outlet OscORP1 = ON Then ON
    If Outlet OscORP2 = ON Then ON
    If Orp < 160 Then OFF
    If Orp > 190 Then ON


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

  3. #3
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    I think the issue with your program is you can't do the if orp then OSC. OSC is a command, not a condition

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by Frogfish View Post
    I think the issue with your program is you can't do the if orp then OSC. OSC is a command, not a condition
    Basically yeah. The reason it need virtual outlets is because OSC has both ON and OFF states that overwrite everything above it in the programming. Virtual outlets like I showed above is the workaround.

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

  5. #5
    Frequent Visitor
    Join Date
    Mar 2013
    Location
    Corunna, Ontario, Canada
    Posts
    146
    Quote Originally Posted by zombie View Post
    Multiple OSC statements require virtual outlets.

    OscORP1 (VO)
    OSC 000:00/000:04/000:10 Then ON
    If ORP > 180 Then OFF

    OscORP2 (VO)
    OSC 000:00/000:04/000:10 Then ON
    If ORP < 181 Then OFF

    Pump (physical outlet)
    Fallback OFF
    Set OFF
    If Outlet OscORP1 = ON Then ON
    If Outlet OscORP2 = ON Then ON
    If Orp < 160 Then OFF
    If Orp > 190 Then ON


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

    Thank you very much, works perfectly, you're a big help!

    Cal

Similar Threads

  1. One or two Defer statements?
    By akbob96 in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 05-19-2020, 10:32
  2. If Power Statements
    By Berrysb in forum Misc Apex Usage & Programming
    Replies: 14
    Last Post: 07-09-2014, 07:44
  3. When is the beginning for OSC statements?
    By bqq100 in forum Misc Apex Usage & Programming
    Replies: 5
    Last Post: 04-28-2014, 05:56
  4. Two OSC statements for one outlet?
    By Linuxgangster in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 1
    Last Post: 03-07-2014, 07:59
  5. Help! Additional OSC statements not working
    By tiorio in forum Misc Apex Usage & Programming
    Replies: 7
    Last Post: 07-05-2013, 10:07

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
  •