adccommunitymod (AutomationDirect) asked a question.

click BCD

Created Date: July 11,2018

Created By: mbAdmin

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I am new to using the click plc (C0-00D2-D) I could use a little help with using BCD. I have a 2-digit thumbwheel I would like to use for picking recipes. I used the FRD instruction when using AB software but I am not sure how to go about it using the click software a little help with what instructions needed would be appreciated thanks


  • adccommunitymod (AutomationDirect)

    Created Date: July 11,2018

    Created by: mbAdmin

    I am new to using the click plc (C0-00D2-D) I could use a little help with using BCD. I have a 2-digit thumbwheel I would like to use for picking recipes. I used the FRD instruction when using AB software but I am not sure how to go about it using the click software a little help with what instructions needed would be appreciated thanks

  • adccommunitymod (AutomationDirect)

    Created Date: July 11,2018

    Created by: johnaden

    In the help "Data types ", it states that the Click does not support BCD. If necessary, I am sure you could write a math function combined with logic to do a conversion.

  • adccommunitymod (AutomationDirect)

    Created Date: July 11,2018

    Created by: Ridgeline Mach

    What is the make and part number of the thumbwheel?

  • adccommunitymod (AutomationDirect)

    Created Date: July 11,2018

    Created by: Tinker

    I'm curious, are you using 8 inputs, or 4 inputs and an output to scan the switch sections?

    If a straight 8 bit input of consecutive inputs, one could "pack copy " to a DH register (the CLICK only allows "pack (or unpack) to (or from) a "hex " register) then "single copy " said register to a DS register to use as a regular integer. Now one potential issue of that very basic method is that the numeric value won't match what the switch is showing (e.g. 4A is not a valid decimal number, but each switch setting will have a unique value , e.g. 74 for 4A, also what looks like a normal decimal number won't be what one might expect for example switch setting 22 = 34. Copy between integer types does, I think, a straight bitwise copy without considering types. But an additional line or two of code could fix that easily enough. While I didn't load it into an actual PLC and try it, the math dialog did not give an error with: DH1 AND F0h * 10h + DH1 AND Fh with a destination of DH2, Note that when in hex mode everything has to be hex, I can imagine some parentheses could be needed, I think AND should have higher precedence than arithmetic operators, but I'm not certain.

    I wish the CLICK had a simulator (or better a BRX the same price as a CLICK in which case I'd just not bother with the CLICK at all)

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 12,2018

    Created by: mbAdmin

    Thanks for the help. The thumb wheel P/N (642-SMCD131AK2). I will be using 8 inputs

  • adccommunitymod (AutomationDirect)

    Created Date: July 13,2018

    Created by: Ridgeline Mach

    Try this out