Announcement

Collapse
No announcement yet.

Integer to binary output with a Click

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • Integer to binary output with a Click

    Had an application, where the value at DS1 had to be converted to a binary output to select the proper recipe to a third party controller. Looked through the programming examples on the technical forum, and found none. Through trial and error, discovered I had to first convert it to a hex value before it could convert to physical outputs (was accustomed to the Domore where you can do almost everything in one command). Anyhow, came up with this. I hope it may help others.
    Attached Files
    Last edited by Ridgeline Mach; 08-01-2015, 11:11 AM.
    If you've done the very best you can, worrying won't make it any better - Walt Disney


  • #2
    HI Ridgeline Mach,
    Thanks i was able to use this in reverse to calculate an integer based on 4 inputs. Saved a lot of code.

    marcus

    Comment



    • #3
      Originally posted by Ridgeline Mach View Post
      Had an application, where the value at DS1 had to be converted to a binary output to select the proper recipe to a third party controller. Looked through the programming examples on the technical forum, and found none. Through trial and error, discovered I had to first convert it to a hex value before it could convert to physical outputs (was accustomed to the Domore where you can do almost everything in one command). Anyhow, came up with this. I hope it may help others.

      Yeah, when you pay ~$50-$150 for a cpu, you just have to expect the bells to be tinny and the whistles to be shrill. But, hey the Click can do things that still surprise me.
      i.e. Try doing a text compare contact in PAC Suite.

      I learned about the copy to hex when learning about cmore micro buttons and leds
      Maybe, if I had your fortitude, I would have posted as you did, so, Thank You.
      Last edited by kewakl; 06-17-2016, 03:57 PM.

      Comment

      Working...
      X