Announcement

Collapse
No announcement yet.

click BCD

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

  • mbAdmin
    started a topic click BCD

    click BCD

    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

  • Ridgeline Mach
    replied
    Try this out
    Attached Files

    Leave a comment:


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

    Leave a comment:


  • Tinker
    replied
    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:
    Code:
     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)

    Leave a comment:


  • Ridgeline Mach
    replied
    What is the make and part number of the thumbwheel?

    Leave a comment:


  • johnaden
    replied
    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.

    Leave a comment:

Working...
X