- Interactive Q & A - Interactive Q & A (
-   LIVE PLC Questions And Answers (
-   -   Easybuilder Pro question #9 (

sparkie October 8th, 2018 11:06 AM

Easybuilder Pro question #9
Wrapping up the debugging and install for this system (been a pain with school and a local flood). I'm looking to limit the input values in the HMI based on current tag values. What is happening is when they enter some crazy number there is an overflow on the target device and values get overwritten.

I'm using a numeric object with different read and write addresses. I saw that there is a dynamic limit, but I'm wanting there to be some notification for an invalid value.

Thanks again.

Jonnie_R October 8th, 2018 12:04 PM

1 Attachment(s)
You can set a notification bit on entering an invalid value. It is on the general tab of the numeric object property at the bottom.

I use this with a PLC Control setting to open up a pop up screen.

damica1 October 8th, 2018 06:09 PM

What kind of Notification?

POP up window, that explains the problem?

sparkie October 8th, 2018 07:04 PM

Really, i'm confused about setting the actual limits. I would prefer them to be a tag value. I can do them in the plc, but I figured it would be faster in the hmi.

Jonnie_R October 9th, 2018 02:07 AM

1 Attachment(s)
You can use dynamic limits, which allows you to use word values to define the low and high limits. Depending on how you are using your system you could do this one of two ways. Either define the value using a macro to SetData on screen start up, or have a screen where you can enter the values on commissioning.

If you want to retain the data use RW(retentive word) data type.

sparkie October 9th, 2018 08:57 AM

So does that mean that a limit is the same thing as an invalid value? I want to compare the value, as it is entered to a tag and reject it if it isn't between the values of two tags.

Jonnie_R October 9th, 2018 09:13 AM

Yes, if it is below the minimum value, or above the maximum value specified by the dynamic limits it will notify you by whatever mechanism you configure. I have created a basic project with it set up, and stuck it on my cloud server. I have used EBPro so you will need this version or later to open it.

sparkie October 9th, 2018 04:50 PM

Why in the world would they implement it like that? The tag value for n+1 in my program is almost always -1. So that means it will never accept my value. Also, thank you for taking the tie to help.

Jonnie_R October 9th, 2018 05:32 PM

What value does your minimum value hold then if your maximum is -1?

It should work with signed words, otherwise it would be pointless.

kvogel October 9th, 2018 06:00 PM

The limit values are the limit of what the HMI will accept for that input object, it doesn't affect what value the address can contain,

If a value is input into the numeric input object that is beyond the range of the limit the value of that input object the value in that address will not be changed and the display will revert to the previous value.

The notification of invalid input will also be set to true.

If another numeric input, without limits set, and with the same address as the one above has it's value changed, the value in the address is changed appropriately and will be displayed in both input objects even though the first is an "out of range value" and the invalid input bit will not be set.

Hope this clarifies things


sparkie October 10th, 2018 09:12 AM

Sorry about yesterday. It seems I put my left foot on the floor first when I got out of bed. So I'm going to give a bit more detail about what I'm trying to do.

I have a cooling-type temperature process. I set a lower end temperature, where the output shuts off and a higher end temperature, where the valve opens to keep the process in a range. The user determines this range. So I need to prevent the high setting from ever being less than the lower range + 1. I also need to prevent the low end setting from ever being lower than the process minimum. These writes cause errors on the controller.

I'm thinking that I need to do this with a macro, and I'm looking up how to do it. and macro syntax isn't bad, and I saw you can use a control object to run the macro when the screen in active, but I'm not quite sure how to go about that, as I've never used a macro on any HMI before.

kvogel October 10th, 2018 10:06 AM

There are a few ways to skin this cat, it all depends on how comfortable you are with the macro.

I wouldn't worry about the macro running all of the time, the overhead is minimal and you could always increase the execution period.

Next it just depends on where you want to handle the calculation for the range limits. The addresses for the dynamic limit high & low values need to be from the same device and consecutive (See the usage note when you turn on dynamic limits). If the low range limit is already being passed to the HMI and you don't want to change the PLC code then calculate the high limit in the macro and pass the low limit and the calculated high limit values to the dynamic limit register (LW address of your choice) in the HMI. Be carful of your declarations in the macro as they can be a bit confusing. I'm assuming you have a input for the low limit and the high limit and you will be setting the limits of each of those values to prevent the user from entering incorrect data into each of the respective inputs


sparkie October 10th, 2018 09:50 PM

Sounds good. Some pseudo logic would look something like:

Chiller on min value = chiller off value + 1

Setting to a local word isn't a big deal, then I would also have to set a max value. I could set it to something arbitrary for the system like 50 degrees. I've just done some updates I have to go install tomorrow. He actually called me today because it was bugging out, so I had him just switch it over into hand for the evening.

I would only have one macro running at a time when that particular screen is active. This will run as a separate task and not hang up the rest of the HMI?

Jonnie_R October 11th, 2018 02:12 AM

I have an MT8071iE reading in Modbus data from 15 devices and doing conversion/alarm notification, using about 30 macros all executing every 100ms and the screen has no issues in terms of performance.

sparkie October 11th, 2018 09:00 AM

Out of curiosity, when the screen is not active, will the macro execute?

All times are GMT -5. The time now is 06:04 AM.