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

Connection to Datalayer does not work [OPC-UA] - randomly

Connection to Datalayer does not work [OPC-UA] - randomly

Franck_FR
Established Member

We use CtrlX with WebIQ to make an HMI to control a machine (see photos below for the config), we use datas from the datalayer, and we read it from WebIQ with OPC-UA. we use a display and Chrome as Browser to look at the HMI and use it.

The link between the datalayer and webIQ is done and it works well most of the time. The thing is that sometime, when we starts the CtrlX and the screen up, the connection does not work, we proved it by using a boolean with a fixed value of TRUE in the datalayer, and when this boolean is read (through OPC-UA) at "true" value in WebIQ, the red sentence at the top of the screen disappear.

When the problem comes up, I open WebIQ designer to look at the connection state, and It looks to be ok, then I open the HMI with the "browser preview" and it works there. Then I go back to the "real" HMI in the same browser, and it does not work... (see photos attached)

 

The only way to solve it until now is to restart the system until it works...

Did you already get this issue ? do you have solution ?

thank's in advance,

HMI no connection.png

OPC-UA connection ok.png

 

Browser preview.png

Franck_FR_0-1676036055761.png

 

   

 

9 REPLIES 9

webiq-sk
Frequent Contributor

Please provide the connect.log file you can download from http://{YOUR_CTRLX_IP}:10123 under "Settings".
This requires WebIQ 2.13 on ctrlX.

Franck_FR
Established Member

I work with 2.12, any risk if I update it to 2.13 ?

webiq-sk
Frequent Contributor

Please see the changelog and release notes for information on changes:
https://www.smart-hmi.com/user/download/deliver/docs/documentation-webiq-changelog-master-7792/index...

Please note that you *must* update both your WebIQ Designer installation on your development system *and* WebIQ on ctrlX. The versions always have to match.

HmiGuide
Community Moderator
Community Moderator

Your description is a bit confusing. On one side you "read data from the datalayer", on the other side you say that you "read the data via OpcUA".

Since you can only read the datalayer from WebIQ via the REST API, I interpret this as follows: Data is read in the PLC program
- via FB's from the datalayer
- then transferred to WebIQ via OpcUA.

So the problem can be either:
- reading the data in the PLC 
- in the communication via Opc UA.

Apart from that, using a boolean variable to check connection between PLC and HMI is quite inconvenient. You should use the WebIQ widget Heartbeat instead. This works as follows:

You define an INT variable in the PLC program, which you increment in each cycle (e.g. iPlcHeartBeat).
You enter it in the Hearbeat widget in the "Item" field of the "Connection Monitoring PLC -> HMI" section.
With the same functionality you can monitor the communication in the PLC program. Section "Connection Monitoring HMI -> PC

Franck_FR
Established Member

You will find attached the server.log

It looks there is not lots of information in the server.log. it may be because i just changed my HMI to 2.13 today..

Sorry that I am not clear enough, I am a user not a developper. I think this is the way you interpreted it.

HmiGuide
Community Moderator
Community Moderator

Did you check if the data is always available in PLC? Did you change your communication check?

Franck_FR
Established Member

it depends what do you mean by "available in the PLC", the app PLC was running for sure.

I made the change in my communication check, I used the same item for HMI -> PLC ( not sure this is the way..).

The thing is that the error comes randomly, so I have to wait for another error.

Ps : one colleague of mine told me it could come from the project name that is loaded in the sever, sometimes the server takes the old one if the it was the same name. So we save the project on our PC, we delete it from the server, we change the name of the project, then we load it again in the server...

I keep you in touch.

HmiGuide
Community Moderator
Community Moderator

...it depends what do you mean by "available in the PLC", the app PLC was running for sure...

This means that the reading of the data in the PLC is always successful, without an error.
Or said in other words: When the data in the PLC are wrong, the data transferred from PLC to HMI via OpcUa are wrong, too.

webiq-sk
Frequent Contributor

"one colleague of mine told me it could come from the project name that is loaded in the sever, sometimes the server takes the old one if the it was the same name. So we save the project on our PC, we delete it from the server, we change the name of the project, then we load it again in the server..."

That could have happened when using WebIQ prior to version 2.12. From the changelog:
"
Web browser cache time can now be configured in the System & License Manager and has been lowered from the default 24 hours to 60 seconds removing the need to empty the browser cache after updating the HMI."

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