Author Topic: HELP: any sample of numerical code tube?  (Read 10528 times)

qdchen

  • Newbie
  • *
  • Posts: 2
  • I'm a llama!
    • View Profile
HELP: any sample of numerical code tube?
« on: October 30, 2010, 08:52:48 PM »
thanks!
« Last Edit: October 30, 2010, 08:53:13 PM by qdchen »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HELP: any sample of numerical code tube?
« Reply #1 on: October 31, 2010, 09:20:07 AM »
You "could" use each PLC's output to drive a segment of the 7 segment display although it probably doesn't make sense since you will need a lot of outputs to drive a few digit of the display. As for dot matrix display usually these are driven using mutliplexing scheme but you need high side driver (PNP) to drive the row and low side driver (NPN) to drive the column so the all NPN outputs on our PLC are not quite suited for such purpose.

If you need large digit dot matrix LED display, you can buy the entire multi-digit display module for probably a few hundred bucks and you can use the Super PLC's RS232 or RS485 port to communicate with the display. That is the most practical solution to drive such displays.


Email: support@triplc.com
Tel: 1-877-TRI-PLCS

qdchen

  • Newbie
  • *
  • Posts: 2
  • I'm a llama!
    • View Profile
Re:HELP: any sample of numerical code tube?
« Reply #2 on: October 31, 2010, 10:38:36 AM »
thanks for reply,

right, I'm using this "normal" way to control 1 number display...

Tube_1=(No_0+(No_2+No_3+No_5+No_6+No_7+No_8+No_9))
Tube_2=(No_0+(No_1+No_4+No_5+No_6+No_8+No_9))
Tube_3=(No_0+(No_2+No_3+No_4+No_7+No_8+No_9))
Tube_4=(No_2+(No_3+No_4+No_5+No_6+No_8+No_9))
Tube_5=(No_0+(No_1+No_2+No_6+No_8))
Tube_6=(No_0+(No_3+No_4+No_5+No_6+No_7+No_8+No_9))
Tube_7=(No_0+(No_2+No_3+No_5+No_6+No_8+No_9))

but I remember there're other way to use in other PLC system, like fanuc:

codetab=[x0,...x9]

Y0=codetab[number you want to display]

Y0.0-tube 1
Y0.1-tube 2
...
Y0.6-tube 7

does our plc have this command and function?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HELP: any sample of numerical code tube?
« Reply #3 on: November 01, 2010, 09:36:37 AM »
Yes, it is very easy to do with TBASIC language since every 16 digital outputs form a 16-bit binary word:

So two tubes can be controlled by a single word and all you need to do is to assign the on/off of each bit on the two tubes to the output variable:

E.g.  to display the number 5, you turn on  0110 1101 = &H6E
        to dispaly the number 8, you turn on  0111 1111 = &H7F

OUTPUT[1] = &H6E7F will drive two digit of tube with the pattern of "58".

You can store the patterns of 0 to 9 inside some data memory so that you can simply use the number 0 to 9 to index into the DM area to find the pattern and then display it. Doesn't take much programming to achieve this although lots of outputs are used for this purpose.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS