News:

  • April 16, 2026, 10:40:05 AM

Login with username, password and session length

Author Topic: Integer conversion to binary PLC DL250-1 Programming Help  (Read 6378 times)

RDBL

  • Newbie
  • *
  • Posts: 1
Integer conversion to binary PLC DL250-1 Programming Help
« on: October 28, 2010, 03:54:30 PM »
Is there a simpler way to convert an integer to binary form in terms of outputs.
Here is an example; I input the number 3 and Y0 and Y1 turn on or the number 6 and Y1 and Y2 turn on. I need to control a byte (8 bits) of outputs.
I have an example tha may works for 4 bits of outputs. If I enlarge it for 8 bits, the ladder would be very large. I need it to be manageable. Fanuc and Siemens has a function that does this. I wish the Directsoft software did the same.
« Last Edit: October 28, 2010, 04:01:13 PM by RDBL »

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3803
    • Host Engineering
Re: Integer conversion to binary PLC DL250-1 Programming Help
« Reply #1 on: October 28, 2010, 04:35:02 PM »
Look at LDF and OUTF instructions.  I'm guessing you can get away with just the OUTF with a normal LD before it.