Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

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

Datalayer Timeouts? C# ctrlX automation SDK Application.

Datalayer Timeouts? C# ctrlX automation SDK Application.

therusch
Established Member
Hello,
 
I wrote a non realtime C# program including a dataLayer interface. This program provides and subscribes data.
The variables master-state-machine/value and master-state-machine/state are provided and written by the non realtime C# application and read by multiple realtime applications.
The variables, that are subscribed by the non realtime C# application, are provided and written by multiple realtime applications.
 
During startup all connections are established and the variables are created.
 
Log messages:
ctrlX Data Layer system started.
ctrlX Data Layer client created.
ctrlX Data Layer provider created.
Successfully created node 'master-state-machine/value'
Successfully created node 'master-state-machine/state'
 
Afterwards the variables are written in irregular intervals.
 
Log messages:
OnWrite master-state-machine/value: 2
Execute State2
Change state from State2 to State3
OnWrite master-state-machine/value: 1
OnWrite master-state-machine/state: 3
 
After some time, these async write operations take longer than 10 seconds.
These long operations will be registered as timeouts by my application, since a write operations should not take 10 seconds.
 
Log messages:
Execute State6
Change state from State6 to State7
Write value 7 to master-state-machine/state timed out.
Wait execute State7
Execute State7
Change state from State7 to State8
Write value 1 to master-state-machine/value timed out.
Wait execute State7
Write value 7 to master-state-machine/state timed out.
Write value 7 to master-state-machine/state timed out.
Execute State7
 
After some time it seems, that all these operations go through at once.
 
Log messages:
Change state from State7 to State8
OnWrite master-state-machine/state: 7
OnWrite master-state-machine/value: 1
OnWrite master-state-machine/state: 7
OnWrite master-state-machine/state: 7
 
After that the application runs smoothly for some time.
Then these "timeouts" reappear and cause a bunch of failed results.
 
Log messages:
Execute State9
OnWrite master-state-machine/state: 9
Write value 1 to master-state-machine/value timed out.
Write value 9 to master-state-machine/state timed out.
Wait execute State9
Execute State9
Write value 1 to master-state-machine/value failed. Result: System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[Datalayer.IClientAsyncResult,Datalayer.Internal.Client+<WriteAsync>d__56].
Write value 9 to master-state-machine/state failed. Result: System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[Datalayer.IClientAsyncResult,Datalayer.Internal.Client+<WriteAsync>d__56].
Wait execute State9
Execute State9
 
These AsyncTaskMethodBuilder messages occur about 10 times.
Afterwards the application runs smoothly for a short time.
Then all subscriptions send a DL_TIMEOUT for every subscribed value.
 
Log messages:
Failed subscription change in Provider V1. Result: DL_TIMEOUT
Failed subscription change in Provider V2. Result: DL_TIMEOUT
Failed subscription change in Provider V3. Result: DL_TIMEOUT
Failed subscription change in ConditionHandler V1. Result: DL_TIMEOUT
Failed subscription change in ConditionHandler V2. Result: DL_TIMEOUT
Failed subscription change in ConditionHandler V3. Result: DL_TIMEOUT
Failed subscription change in ConditionHandler V4. Result: DL_TIMEOUT
Failed subscription change in InputVariable for CurrentState_Slave2. Result: DL_TIMEOUT
Failed subscription change in InputVariable for State_Slave1. Result: DL_TIMEOUT
 
After that, the application runs smoothly again for a while.
These errors occur in alternating order after that.
 
Code of write operation:
 
result = this.client.WriteAsync(path, new Variant(valueToWrite));
if (result?.Wait(10000) == false)
{
Console.WriteLine(
$"Write value {value} to {path} timed out.");
return false;
}
 
 
 
How could this problem be caused/fixed?
The CPU load is low.
 
 
Thank you and best regards
3 REPLIES 3

nickH
Community Moderator
Community Moderator

Hi @therusch 

I would propose to do a online meeting to analyze this issue further. I think this may be a easier way to get to the root of the problem. 

Best regards, 

Nick

CodeShepherd
Community Moderator
Community Moderator

Moved to corresponding sub forum SDK.

 

nickH
Community Moderator
Community Moderator

The provider itself can set the value of Data Layer Nodes it provides by setting the value internally. The provider does not need to use client functions like write() to do that. 

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