FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
2 weeks ago
Hi,
I made an composite and want to change the data which is shown with an item value.
The widget is configured like this:
The snippet itself looks like this:
The item attached looks like this, which is just an int value:
However, the value is not overwritten when changing the item value. It seems to always be 1.
Is there something I am doing wrong? Or is the snippet functionality to meant for using with (changing) items?
2 weeks ago
You entered invalid JSON code:
You must not have quotes inside "" - this will break JSON as it makes it invalid. If your item (for whatever reason) really contains quotes you have to escape it for proper JSON syntax:
"recipeData.\"<%= Nr %>\".volumes.0.amount"
2 weeks ago
Hi,
Thank you for your reply.
Actually, when not using quotes the item is received as null.
Do I need to acces the actual item value in a different way? Like item.value or something?
2 weeks ago
You have to specify the item name exactly as it is defined in the "Alias" field on the Items tab in Process Data Manager:
2 weeks ago
In any case, why don't you simply drop an input widget into your HMI and connect the item you wish to use there manually? If this works the item name will work everywhere, if it doesn't the item name is incorrect.
2 weeks ago
The name is 100% correct, since I used the 'select item' menu and selected the item from there.
Using an input widget works correctly. This is actually how I change the item in the first place.
However what I try to achieve is to overwrite the array number with the value from the item(for recipe managment purposes). This does not seem to work, the array number remains 1 even though the actual Item is a different number( I checked this from the plc side).
I have done this before using an INT placeholder and this works correctly, but now I want to use an item instead.
a week ago - last edited a week ago
"The name is 100% correct, since I used the 'select item' menu and selected the item from there. "
This does not ensure that the item actually (still) exists with the PLC - it only means that WebIQ knows it, but the referenced item in the PLC might still be gone. Please note that there are two parties involved here: WebIQ is where you setup the alias <-> item name mapping in the PLC. However, if the item is removed from the PLC it will still exist in WebIQ, but not work.
"Using an input widget works correctly."
This means that the item is known to WebIQ and still exists in the PLC, so that looks fine.
"I have done this before using an INT placeholder and this works correctly, but now I want to use an item instead. "
Please do not confuse "item name" with "item value" - WebIQ does not support item values for placeholders, only static values. By selecting "item" as the placeholder type the only thing that happens is that you can then select an item from the dropdown an the *name of the item* will be used for the placeholder, not the value.