cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Bit access read/write from button

aFouraker
Occasional Contributor

Bit access read/write from button

It seems that the read/write feature when using bit access for variables does not work. Here is the configuraiton I am using:

aFouraker_0-1639675668702.png

When I do something similiar with a UI action it works but this is not a reasonable solution in my application.

aFouraker_1-1639675723075.png

 

26 REPLIES 26
HmiGuide
Community Moderator

Re: Bit access read/write from button

Hello

Only with virtual items, there is a bug, that writing of bits is not working. I use it with WebIQ 2.10.0 and it works fine.
Your 2 screenshoots works different.

  1. The second one, only sets the bit.
  2. The first one sets the bit when you press the button and resets it, when you release the button. When you want the same behavior, you must use for press and release the value 1. Could this be the problem?
webiq-sk
Occasional Contributor

Re: Bit access read/write from button

For virtual items bit access is not supported. However, as virtual items only exist in the user's browser anyway there is probably no valid reason to use them with bit access.

Also, the additional computational overhead for bit access (though negligible) it way larger than the impact of using bytes with *virtual* items anyway.

Regards,
Sascha Kimmel

aFouraker
Occasional Contributor

Re: Bit access read/write from button

I understand they are different, I was trying to demonstrate that bit access was possible but that it failed in the first case. 

If I upgrade to the latest this problem is gone?

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

Hello,

no, as this is not a bug. Virtual Items do not support bit access. Unfortunately this is not mentioned in the manual.

Regards,
Sascha Kimmel

aFouraker
Occasional Contributor

Re: Bit access read/write from button

This is not a virtual item. This is linked to a variable on the OPC-server

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

Which version are you using?

aFouraker
Occasional Contributor

Re: Bit access read/write from button

2.10.0

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

To find out whether a specific issue has been fixed with later versions of WebIQ you can always check the changelog: https://docs.webiq.de/docs/changelog/ 

aFouraker
Occasional Contributor

Re: Bit access read/write from button

The only references to "bit access" in that document are from rev 2.6. Is there a newer fix? 

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

The latest release of WebIQ is version 2.10.3 - the changelog always lists all releases available. If a problem is not listed there it has not been fixed.

aFouraker
Occasional Contributor

Re: Bit access read/write from button

To be clear, this is a problem and it is not addressed. Is that correct? 

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

Did you follow the suggestions by StefBaro and it still does not work?

aFouraker
Occasional Contributor

Re: Bit access read/write from button

from StefBaro: 

Only with virtual items, there is a bug, that writing of bits is not working. I use it with WebIQ 2.10.0 and it works fine.
Your 2 screenshoots works different.

  1. The second one, only sets the bit.
  2. The first one sets the bit when you press the button and resets it, when you release the button. When you want the same behavior, you must use for press and release the value 1. Could this be the problem?

This is a description of what I was showing in the initial question, not a recommendation for a course of action. I added that image in the original question to demonstrate the error. I want to use the automatic bit access, not the UI linked action. 

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

As I wrote before using bit access with virtual items is not currently supported, but not a bug.

StefBaro wrote "When you want the same behavior, you must use for press and release the value 1. Could this be the problem?"

Did you try this?

aFouraker
Occasional Contributor

Re: Bit access read/write from button

As I wrote before using bit access with virtual items is not currently supported, but not a bug.

How is virtual tag defined? This is not a virtual tag, it is linked to an OPC tag. 

StefBaro wrote "When you want the same behavior, you must use for press and release the value 1. Could this be the problem?"

Did you try this?

How is this done without a UI Action? I don't want to use UI actions to set and clear bits in a control word that is configured in OPC-UA, not a virtual tag. 

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

A virtual item is an item that it listed in the virtual item list in the Process Data Manager:

webiqsk_1-1639754044771.png

StefBaro suggested to enter a 1 in the field where a 0 is written:

webiqsk_2-1639754139978.png

 

aFouraker
Occasional Contributor

Re: Bit access read/write from button

I understood StefBaro to be saying in the second case that I showed another action is required to clear the bit I set on release IF I want it to work like the built in feature shown in the first image I posted (the one that doesn't work). 

I can try what you are recommending but this would mean that it does not work like all of the other places that bits are accessed in the application when not using the "Bit Access."

For example, in my application, this works no problem:

aFouraker_0-1639754434456.png

and as I showed in the original picture, this does not. 

aFouraker_1-1639754469700.png

Are you suggesting that in the specific case where Bit access is required then the "Off-Value" must also be set to a value of 1?

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

That's what StefBaro suggested and I justed wanted to make this clear with the screenshot.

aFouraker
Occasional Contributor

Re: Bit access read/write from button

I can try it. 

aFouraker
Occasional Contributor

Re: Bit access read/write from button

This also does not work:

aFouraker_0-1639755247580.png

 

aFouraker
Occasional Contributor

Re: Bit access read/write from button

Hello, are there any other recommendations for making this work? 

NickOS
Member

Re: Bit access read/write from button

Hi @aFouraker , I understand your pain. I am reviewing WebIQ at the moment and fell in to the same hole. For me, the inconvenience is I cannot/ do not want to write the WORD and BITMASK repeatedly. Not sure if it suits you to do the same, but I utilised your UI-actions approach and did a SET on-press and CLEAR on-release. However I did this within a composite and used placeholders and snippets, so that I only need enter the target data once. I then use my composit widget in lieu of the native button.

NickOS
Member

Re: Bit access read/write from button

As promised to @HmiGuide, a more detailed explanation of what we are doing to claim bit access does not work:

I create data within PLC, in this case an MLC. Here it is an INT, but I have tried UINT, WORD, UDINT, etc., etc. I then find and add via browser, and the type is shown. The data is now listed in variable menu, not virtual.

NickOS_0-1670253713334.png

Next I create 2 buttons. the first sets a value only. I do this to show that I have got the use of the button correct, such as 

NickOS_1-1670253862877.png

I also provide a data field to see whole of iINT. And when I press the button, it can be seen in the HMI and PLC the value changes. So my whole commuincation method is proven at this point.

NickOS_2-1670253981583.png

I then add a second button which instead uses bit access, and do the same operations. 

NickOS_3-1670254026838.png

It can be observed here that iINT neither changes in the HMI or the PLC

NickOS_4-1670254073024.png

So please, by all means, point out the blatantly obvious thing I am doing wrong, but from what I can see, specifically bit access is not working for this button.

webiq-sk
Occasional Contributor

Re: Bit access read/write from button

It's always helpful to open the browser console in the HMI (F12, like in any browser) - this will likely show an error like this which I just encountered while trying to reproduce the issue:

webiqsk_0-1670255521387.png

This has now been planned to be fixed with WebIQ 2.13 which is scheduled to be released within the next few weeks.

NickOS
Member

Re: Bit access read/write from button

Ah, that is a handy hint, thanks.

And good to hear it is noted. 

HmiGuide
Community Moderator

Re: Bit access read/write from button

I also did not realize, that in the very first entry of this topic you get the information, that writing via "Write on/off values when pressed/released" is not working. But the workaround, by using "Write Item" is shown, too.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist