Results 1 to 6 of 6

Thread: Digital switch code color not right

  1. #1
    Regular Vistor
    Join Date
    Jan 2018
    Location
    Aliso Viejo, CA
    Posts
    40

    Digital switch code color not right

    Anyone know why my digital switch ATOLow is not turning red like all the others when I use it in code? This is a float switch on a breakout box. OFLevF for example is a float switch setup the exact same way but working correctly in code. Thanks

    Capture.JPG

    Capture1.JPG

  2. #2
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940
    We were just discussing this on another thread. It seems to be fairly commonly seen with switches, both optical and float, and typically doesn't affect function (but you should test that to make sure.)

    Most of the people reporting this condition see it in conjunction with using the FMM/ATK. But you're seeing it with a Breakout Box. One similarity though is that the name of the switch begins with 'ATO'. I think this may be the key, perhaps this is part of a system reserved word or expression or something. I just did a little test on my new system, which has the ATK optical switch 'ATOHi' in grey. Changed the name to 'bTOHi' (just the first letter), and then it loads in red. Changed it back to 'ATOHi', grey again.

    I'd don't know if I'd call this a bug per se, although users should probably be made aware of it. Knowing this exists, I may have to change the names of all my 'ATOxxx' switches.

  3. #3
    Regular Vistor
    Join Date
    Jan 2018
    Location
    Aliso Viejo, CA
    Posts
    40
    Yeah, I just saw that thread after posting this. You're right. I just change the name of my switch to TopOff instead and the coding is back to normal now.

    Thank you!!

  4. #4
    Frequent Visitor Todd's Avatar
    Join Date
    Jan 2013
    Location
    Huntsville, AL
    Posts
    583
    Quote Originally Posted by rkpetersen View Post
    Knowing this exists, I may have to change the names of all my 'ATOxxx' switches.
    In past cases of reserved words, it parses starting at the beginning of the word. So, ATOXX would cause an issue; but XXATO would not.

  5. #5
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940
    Quote Originally Posted by Todd View Post
    In past cases of reserved words, it parses starting at the beginning of the word. So, ATOXX would cause an issue; but XXATO would not.
    That's what I meant. I currently have several switches, on two systems, named 'ATOsomething'. So perhaps time to change them.

  6. #6
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940
    Update:

    Just renamed the ATO optical sensors to 'SumpLo' and 'SumpHi'. And then noticed some abnormal code behavior. When you rename a switch, that name change should propagate through all the code. But when I changed the name of a greyed out switch, it did not change in the Fusion ATK code as well, it remained the same greyed out 'ATOHi' as before. I then waited 30 minutes with page reloads etc to see if the name change was just delayed, but it remained incorrect. Oddly enough, the name change did occur properly and immediately in Apex Local. To get the switch to have the correct name (and function) in Fusion, I had to update it separately in the program code where the name is used. This seems like a potentially dangerous bug, if simply renaming a switch breaks your code, and you're not aware of it.

    Over half an hour after I changed the switch names, with stable network communications, here's what my ATK code looked like in Fusion:

    Clipboard01.jpg

    And here's how it looked in Local:

    Clipboard02.jpg

Similar Threads

  1. help with a float switch program code
    By james.mcclain in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 2
    Last Post: 04-10-2020, 15:52
  2. Help! Recurrent alarm for digital switch that isnt in alarm state
    By jeremym in forum APEX Fusion
    Replies: 5
    Last Post: 12-20-2019, 16:08
  3. Help! Sump high water level digital switch
    By savagereef in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 06-09-2019, 11:55
  4. Help with switch code programing
    By Jtaylor1101 in forum Misc Apex Usage & Programming
    Replies: 11
    Last Post: 04-29-2015, 10:06

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
  •