BCD to seven segment display

Rich

Member
Join Date
Jan 2003
Posts
1
I want to display a piece count on a 6 digit BCD to seven segment display. Using an AB PLC5 processor with two 16 point DC output cards I require 4 outputs per digit, so I can take data directly from my 16 bit binary file and write it into my 16 bit output table to display those numbers. So everything is OK for a 4 digit display, my problem is how do I display my next two digits. Using 16 bits from one output table to display 4 of six digits... then 8 bits from another output table to display the next 2 digits??? How do I program this?

Thanks for the help
 
You'll have 6 digits?? I assume 0 thru 999999. So it's got to be a float. You have to split the big number into LSD's and MSD's. (2 and 4 or 3 and 3)

[attachment]

To split 3 lsd and 3 msd, first divide n7;3 [7680], the wanted value by 1000 result to f8;1 [7.680]. Then move f8;1 to n12;31 [8]. then check to see if n12;31 [008] is greater than f8;1 [7.680]. If it is, f8;1's decimal was more than .5 and the plc5 rounded the value up and put it in n12;31. If it was rounded up, it is no good and you have to subtract one to "unround it" and put it back in n12;31[007]--this is very important. Now n12;31[007] is the 3 MSD value.

To get the 3 LSD's do a compute n7;3[7680] -(n12;31[7]*1000)[7000] result to n12;32 [680]. n7;31[007] msd's, n7;32[680] lsd's

To make your application easier, do the 2 msd's and 4 lsd's. divive and multiply by 10000 instead of 1000. Then n21;31 is [00] and n7;32 is [7680]

You'll have to do a frd and a bit distribute to get the numbers to the right i/o cards.

splitint.gif
 
Last edited:
curious

John,
I am very intrigued about your graphics post. What did you use to produce the graphic? Also, what was the software you used for the ladder diagram itself? I am working on a project for my school where I am using graphics, and have to admit, I am not doing very well to date. I teach PLC's twice a year where I work, and am helping my state community college system put together and online version of the course. Programming a plc presents fewer problems for me than does putting together articles for an online class about them. Thanks for your help, John.
Regards
Randy
 
screen capture

Eric,
I could see that John used a screen capture, but was wondering what software he used to do it. I have been getting some practice with HTML Help and I figure there are some other packages that give you the same options. I also thought that the "pic" was of RsLogix but wasn't sure do to the colors, as I never bother to set colors on my version of logix. I use the default, so this color scheme threw me a bit. Thanks for the info though Eric.
Regards
Randy
 
Yes, it's rslogix 5. The screen capture software is "snagit". I got it free off the web. Search snagit. It's only free for 30 days, though. The thing snagit does nicely is capturing the entire scrollable window. I outline the part of the screen to be captured, then hit the down scroll arrow, and snagit gets the whole thing. It can make images too large to post here, though. Search "screen capture" to get all kinds of freeware and shareware options.
 
Last edited:
Microsoft Photo Editor works very well. We routinely use it to include screen prints into our Word documents. This allows us to 'crop' the screen image. Files converted top jpeg are much smaller than bit maps.

I'll often use the screen print function instead of a ladder print out function if I am FAX'ing instructions to a customer since it is sometimes quicker, and the screen dump is exactly the same as the programming screen, where as some print out functions will look slightly different due to cross reference features, print format, etc.
 
graphics

John,
I use MicroSoft HTML Help image editor, and was just wondering what you used. I see that snagit does a good job, but costs bucks. The MS stuff is free, as are other things you probably have seen.. I found one called 20-20 which I am just getting used to, but seems to offer a fair set of tricks and quirks. I can send you the link were I found it if you like. Greg is right about the MS stuff so far as I have used it, and it is relatively easy.
Randy
 
Rich, what PLC-5 data format is your value in to begin with ? Does the display have to show whole integer values or is there a decimal place in it ?
 

Similar Topics

How is it possible to get "-"sing with BCD seven segment LED display. With combination of four bits we get digits from 0 to 9. What should we do...
Replies
3
Views
2,293
hi... i have an issue in s7 300 plc, while we run the machine(in idle there is no fault) , plc cpu goes in SF mode, after restart the power cycle...
Replies
2
Views
107
Hi. I’m doing a PV 1400e to PVP 7 migration and I don’t know how to convert the old 8digit BCD type from PB1400e into something that will work on...
Replies
2
Views
587
I'm working on converting an old PanelBuilder 1200 HMI application into FactoryTalk View ME. The PLC was an old SLC 5/02 with a scanner card for...
Replies
2
Views
1,102
I have a Cmore screen which is communicating to the DL06 in BCD and need to create a timer that works in real numbers for a test, I simply need to...
Replies
3
Views
2,124
Back
Top Bottom