Directsoft5 Timer

roxusa

Lifetime Supporting Member
Join Date
Nov 2008
Location
NJ
Posts
994
I am new to the Directsoft5 programing structure and have a question about a timer value setting. My program I am looking at has TMR, T100 with a register of V2022. When I look up V2022 under the Value's Tab online, it says it has a value of 10 in BCD. With this being a 10th of a second increment timer, would that be 2/10th of a second, I thought Bcd counted 0-1-10-11-100 and so on,
However this block lets me change the value by integer increments of 1
10-11-12-13 etc. Im lost, any help will be appreciated.
 
BCD is just how the data is stored into memory. It's all 1s and 0s down there.

BCD is Binary Coded Decimal.
It stores each of the number places in a nibble (group of 4 binary bits). So, for your example of V2022 = 10 the Bit field would look like 0000 0000 0001 0000 when stored in BCD.
As far as your interface with the timer, you're just inputting how many deci-seconds the timer will run (Its Preset) as an integer.

So, to actually answer your question :ROFLMAO: If there is a value of 10 in V2022, then your timer will run for 1 second.
 
thank you, so even though the box is checked to be BCD the number shown (10) is just the number of 10ths of a seconds so if I change it to 12 it will be 1.2 seconds.
Thanks again
 
thank you, so even though the box is checked to be BCD the number shown (10) is just the number of 10ths of a seconds so if I change it to 12 it will be 1.2 seconds.
Thanks again

You've got it. The BCD check box is there just to tell the timer block how to interpret the data stored in the memory. Depending on what loads the data into V2022, it may have been more efficient to use BCD instead of BIN. I bet if you unchecked the BIN box in the timer block, you would see your preset change to 16, even though the source data would remain the same.
 
You've got it. The BCD check box is there just to tell the timer block how to interpret the data stored in the memory. Depending on what loads the data into V2022, it may have been more efficient to use BCD instead of BIN. I bet if you unchecked the BIN box in the timer block, you would see your preset change to 16, even though the source data would remain the same.

Well, strictly speaking, the bit pattern in the word would remain the same, but the interpretation of the bit pattern as numeric data would change.

BCD is not an efficient way to store numerical data. Binary is more efficient and hexadecimal is even more efficient than is binary. I suspect that many younger programmers never had to deal with thumbwheel inputs or LED numeric displays in hardwired control panels. That was why we needed the BCD data format back in the day -- for IO interfaces to these devices.
 
Well, strictly speaking, the bit pattern in the word would remain the same, but the interpretation of the bit pattern as numeric data would change.


Right, this is the point I was trying to make. Thanks for making it a little more concise.

BCD is not an efficient way to store numerical data. Binary is more efficient and hexadecimal is even more efficient than is binary. I suspect that many younger programmers never had to deal with thumbwheel inputs or LED numeric displays in hardwired control panels. That was why we needed the BCD data format back in the day -- for IO interfaces to these devices.

Hey, don't lump all of us younger programmers together. (y)
Thankfully, my first controls job required me to support a lot of old systems. (Simatic TI545/TI555 old)
 
According to manual, the DLxxx series' native format is BCD. All the descriptions of the standard math instructions state 'when the BCD value in the accumulator' or words to that effect. There is also a flag which monitors the math instructions - SP75 On when a BCD instruction is executed and a NON-BCD number is encountered .

This is distinguished from another set of math instructions which operate on binary numbers - The Add Binary instruction adds a 16-bit number (Aaaa) to the value stored in the accumulator.

Here's a snip from the DL-205 user manual, page 3-36

a-d bcd.PNG
 

Similar Topics

My question is would converting a project originally from DirectSoft5 to DirectSoft6 loose the labels and rung descriptions. One of our other...
Replies
5
Views
2,693
I am very green at PLC programming. I have a program with 135 rungs running on a Direct Logic DO-06DR. I am wanting to remote control and remote...
Replies
11
Views
3,585
How would I go about converting this ladder diagram from logixpro to directsoft?
Replies
14
Views
2,480
I'm having a bit of a trouble with directsoft, thats cuz I'm pretty much used to RSLogix. So, I'm currently using a DL06 with no Analog card, my...
Replies
2
Views
1,953
Hey Guys, I have a very small program I wrote for work, I was wondering if I could get some input. The program has manual controls: Vacuum...
Replies
22
Views
3,906
Back
Top Bottom