
adccommunitymod (AutomationDirect) asked a question.
Created Date: May 27,2006
Created By: robertkeenan
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I want to have ten buttons on a screen which sets one digit of V2000 to a value between 1 and A. Can not get it to work as the C-More panel will only take numbers and not accept any A to F values. I will get around the problem by using values 0 to 9 but if I needed eleven buttons then I would be stuck. Everything is set to bcd int 16. On a similar topic if I have a numeric input field, how can I control the value entered. It is possible to restrict the number of digits in the number but how do I restrict it to a number no higher than eg: 60
Created Date: May 30,2006
Created by: Tech Guy
You need to use Unsigned Integer to allow Hex input. The only valid values for BCD are 0-9.
Created Date: May 30,2006
Created by: robertkeenan
Have just tried what you have said. It did not appear to work. Using directsoft you can set a vaue between 0 and F and it is called BCD format. With the touch screen when I go above 9 it flows over and becomes 10 and the program will not allow me to have a preset value of A.
Created Date: May 30,2006
Created by: marksji
Change your data type to HEX in the C-More.
The problem you are running into is that BCD is binary coded decimal, only decimals are technically supported as part of BCD; A-F are not part of the BCD format nor are they supported as any type of integer.
If you want to use 0-F then you are talking about HEX.
Created Date: May 31,2006
Created by: robertkeenan
The C-More panel does not have an option for Hex, and yes I have just noticied on the PLC it is called BCD/Hex. So what Iam trying to do may not be possible. Thanks for your advice anyway.
Created Date: May 31,2006
Created by: jackson
Your tag needs to be unsigned integer data type. When you create a numeric entry, if you select a tag that is unsigned integer, you will be able to choose Hex as the Display Format Data Type inside of the object. If you do this, you will be able to enter Hex alpha numeric values such as 12AB.
I just created a tag called, "V2020 " assigned it to PLC address V2020 and made it unsigned integer 16. I then placed this tag in a numeric entry object and chose Hex as the Display Format Data Type.
I can now type in hex values and they show up exactly as I typed them inside of the V memory. I verified this by opening DirectSoft, looking at V2020 in BCD/Hex format.
Direct Logic V memory is weird in that they act like BCD in some places (Counter, Timers, etc...) and Hex in others.
Created Date: May 31,2006
Created by: Tech Guy
Take a look at this document on the differences in the data formats Robert. Perhaps it will clear up why the Data View shows BCD and HEX in the same way even though they are totally different number formats.
Created Date: May 27,2006
Created by: robertkeenan
I want to have ten buttons on a screen which sets one digit of V2000 to a value between 1 and A. Can not get it to work as the C-More panel will only take numbers and not accept any A to F values. I will get around the problem by using values 0 to 9 but if I needed eleven buttons then I would be stuck. Everything is set to bcd int 16.
On a similar topic if I have a numeric input field, how can I control the value entered. It is possible to restrict the number of digits in the number but how do I restrict it to a number no higher than eg: 60