Check out the list of all tutorial videos on the C-More Micro HMI at this link: https://c-moremicro.automationdirect.com/support/video.html
Our FREE Practical Guide to Programmable Logic Controllers eBook: https://www.automationdirect.com/ebooks/plc-handbook
The Numeric Display object shows the contents of a tag. If I change this TAG to let’s say 79, you can see the result appear on the panel. This tag would normally be on a PLC, of course. In addition to all the usual formatting options which you can see in the “How To Use Common Object Features” video, the numeric entry display gives you a lot of control over how the data will be displayed. Let’s take a look … Double Click or drag the Numeric display onto the screen. Also, if you see one you like down here on the parts list you can just drag that onto the screen to save yourself some time setting it up. The Data Type over here is context sensitive - It looks at what is currently specified for a TAG and reacts accordingly. For example, if we specify an unsigned integer TAG – which I happen to know TEMPERATURE 3 is an unsigned integer - the Data Type drop down limits us to these three types – unsigned decimal, octal and hex. But if we specify a Signed TAG - TEMPERATURE 1 is a signed TAG – now the drop down limits us strictly to a signed decimal – it doesn’t make any sense to use hex or octal here. The number of digits is also context sensitive. If we go back to that unsigned decimal, TEMPERATURE3, this dialog knows that you don’t need more than 5 digits to display a 16 bit number so you can’t crank this up to over 5 digits. The fraction number here, tells the display where to put the fixed decimal point. To emphasize this let’s choose an unsigned data type, and set the fractional number to 1 and take a look at it in the simulator. Let me re-format this a little bit so we can see it better … there we go. Now let’s hit simulate … save the project and up pops our simulator with our numeric display. If we change this value to oh say a 15, then display changes that to a “1’ and a “5” but it puts a decimal point one character over just like we specified. You can also add text before and after your numeric display. Let’s take a look – I’m going to make this object bigger so we have room for all of this text – double click on the object, move this out of the way so we can see what we are doing .. and down here we can specify a prefix. Let’s say “Temp = ”, a suffix (we’ll add a “C” for degrees celcius) and you can even add a comma separator. Let’s choose a larger number format here – I’m going to look in the TAG database … you can see that Temperature 1 is a signed 16 bit integer … Temperature 3 is an unsigned integer … let’s change temperature 2 to a much larger number, an unsigned 32 bit integer. We’re going to use that. So now TEMPERATURE 2 which is a Signed 32 bit number is going to be displayed here which means I get a lot more digits to play with. Let’s crank that up to 8 digits. Let’s say OK. Let’s resize our box to make sure we get all of our new text in. You can see it is pre-formatted so you can size it appropriately…. Now we hit SIMULATE, save the project … and up pops our simulator with our new 32 bit number display. Now we can change our number to something bigger .. so we can see it. So, here you can see our text prefix, our text post fix – our fixed decimal point – and our comma separator. This object also allows you to use a TAG to specify the location of the decimal point. That way the PLC can decide where the decimal point should be located as it is running! Let’s try that – all we do is tell the dialog to use a TAG for the decimal point, we pick a TAG, we have already created one here called DECIMAL POINT . Say OK Simulate, Save the project and up pops our simulator … Let’s go ahead and put our big number back in for temperature so we can see it formatted. And now if we move our decimal point to say position 3 – that’s exactly where it appears. How about position 5? Or position 1? So now the PLC can automatically scale the results that are being displayed to the user on the fly as it is running. One final option to look at. Lets go back to a smaller number for a second … Currently there just blank spaces filling out unused space in our numeric display. You can change that to trailing spaces or even leading zeros if you want to: Lets see the effect that has: We’re going to modify our dialog .. and we’re going to say instead of leading spaces .. let’s make it leading zeros to fill out the numeric display. Simulate, Save it. You can see since we haven’t entered any data, it completely filled every digit with a zero. Even when we put numbers in here … we still get zeros filling out all of the leading spaces. Well that’s it for this video – be sure to check out all of the other videos in this series. And as always, please send us any topics you would like to see covered – or - any other comments for that matter – we appreciate the feedback!
Voted #1 mid-sized employer in Atlanta
Check out our job openings