Results 1 to 5 of 5

Thread: What is considered an "Error"?

  1. #1
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,254

    What is considered an "Error"?

    I've been trying to do some code changes and use some of the new commands to improve my output code. I would like to add some logic based on the If error command. I have read through the examples in the sticky and read any other reference I could find for it and I am missing an important piece of info.

    What is considered an error for an output? What needs to happen in order for the error flag for a specific output to be set? The errors for WAV's is outlined pretty well but not for outputs (or I just can't find it).

    Does anyone know what the apex considers an error? Is it only if the when command changes the state of the output or are there other triggers?

    I hope someone knows. Thanks in advance if you know and can provide the answer.

  2. #2
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,464

    What is considered an "Error"?

    The sticky covers the only two use cases for If Error.

    A When statement becoming true constitutes an error state for that outlet, and in turn, an If Error statement referencing that outlet becomes true.
    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
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,254
    I got the use cases in the sticky and have used those. The sticky just isn't clear that those are currently the ONLY use cases and that when is the only thing that will set error to true. I was hoping that there might be other conditions that could set it true including may being able to set error true in code directly (Not sure the use case for this yet but I'm thinking about it). I'm just thinking of other ways that these new commands could be used and brain storming a bit.

    Russ, why is the on/off in the first condition of the when statement not all caps like is the case anywhere else that on/off is used (When On > 005:00 Then OFF)? I found that interesting while reading up on this subject and was curious if there was a reason behind it?

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    It turns to all caps in the code when you upload it. That's just a minor typo in the sticky.

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

  5. #5
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,464
    Russ, why is the on/off in the first condition of the when statement not all caps like is the case anywhere else that on/off is used (When On > 005:00 Then OFF)? I found that interesting while reading up on this subject and was curious if there was a reason behind it?
    zombie is incorrect - it is not a typo in the sticky. I don't make tpyos!!! well, at least I don't when I'm copying & pasting code right out of APEX Fusion!

    Krazie, I dub thee "hawk-eye"; that was an astute observation. But you didn't earn "eagle-eye" status , because there is another case (which has been in the Apex for many years) where On or Off is used vs. ON or OFF.... That same capitalization convention is used in the If Power statements.

    Let's look at three examples:

    When On > 005:00 Then OFF
    If Power EB832_2 Off 001 Then ON
    If Power Apex Off 001 Then ON

    The blue On / Off keywords are part of the condition being tested. In this usage, the Apex makes 'on' or 'off' be in title case (even if you entered it in all upper or all lower case)
    The green ON / OFF keywords following the 'Then' keyword designate the action to be taken if the tested condition is TRUE. In this usage, the Apex makes 'on' or 'off' be in upper case (even if you entered it in mixed case or all lower case)
    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.

Similar Threads

  1. Question: Quick Q - can we rename optical sensor output from "open/closed" to "wet/dry"?
    By BTBarney in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 3
    Last Post: 07-07-2020, 16:49
  2. Help! Fusion not showing "Create Note" or "Log Measurement" tile
    By miahpage in forum APEX Fusion
    Replies: 3
    Last Post: 10-16-2018, 20:57
  3. Help! Error "No communication with Fusion Cloud. Please check your network connections."
    By ShinerMaginer in forum A2 Apex/ApexEL and A3 Apex Pro/Apex/Apex Jr
    Replies: 13
    Last Post: 06-01-2017, 07:25
  4. Help! Radion Firmware update 1.07 - "Fatal Error"
    By marcusbptan in forum Updating Apex Classic Firmware & Web Pages
    Replies: 13
    Last Post: 11-21-2015, 09:53
  5. "Failed to unlock controller" error message during update
    By Ridgeway in forum Updating Apex Classic Firmware & Web Pages
    Replies: 5
    Last Post: 09-23-2014, 12:16

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
  •