How to build IO-Link M-sequence TYPE_2_V - plc

I am working on IO-Link master to read data from IO-Link sensor which is working on M-sequence type TYPE_2_V_10D.
IO_Link datasheet
Has anyone worked before for TYPE_2_V type of IO-link device? Please provide some details how to create isdu build request for M-sequence type TYPE_2_V.
M-sequence TYPE_2_V build request

Related

CRM D365 update polymorphic/multitable lookup via Plugin

I'm trying to update a polymorphic lookup column on a table via plugin code and it doesn't seem happening. Wondering what additional I’m missing.
var entity1Id = "af435c64-a264-4f2a-9cee-22069ce36b3c";
var destinationEntity = new Entity("bookableresourcebooking", new Guid(myBookingGuid));
destinationEntity["my_ploymorphiclookupid"] = new EntityReference("my_entity1", new Guid(entity1Id));
organizationService.Update(destinationEntity);
my_ploymorphiclookupid is a polymorphic lookup (N:1) to my_entity1
Code looks fine. If you didn’t see any runtime errors in plug-in trace log, then few diagnosis steps needed.
Check audit history of that record
Chances of any other plugin steps replacing the value back or rolling back
Try to profile/debug the plugin for clues

Accessing Raw Gamer Profile Picture

I am using the new XBox Live API for C# (https://github.com/Microsoft/xbox-live-api-csharp) for official access through a UWP app.
I am able to authenticate fine and reference the XBox Live user in context.
SignInResult result = await user.SignInAsync();
XboxLiveUser user = new XboxLiveUser();
Success! However, I can't seem to find an appropriate API call to return XboxUserProfile or XboxSocialProfile. Both of these classes contain URLs to the player's raw gamer pics. After reviewing MSDN documentation and the GH library it isn't clear to me how this is achieved. Any help is greatly appreciated.
The below sample should work if you meet the following pre requisits:
Reference the Shared Project that contains the API from your project and don't reference the "Microsoft.Xbox.Services.UWP.CSharp" project
Copy all source code files from the "Microsoft.Xbox.Services.UWP.CSharp" project into your project
Include the Newtonsoft.Json NuGet package into your project
Steps 1 & 2 are important as this allows you to access the "internal" constructors which otherwise would be protected from you.
Code to retrieve the profile data:
XboxLiveUser user = new XboxLiveUser();
await user.SignInSilentlyAsync();
if (user.IsSignedIn)
{
XboxLiveContext context = new XboxLiveContext(user);
PeopleHubService peoplehub = new PeopleHubService(context.Settings, context.AppConfig);
XboxSocialUser socialuser = await peoplehub.GetProfileInfo(user, SocialManagerExtraDetailLevel.None);
// Do whatever you want to do with the data in socialuser
}
You may still run into an issue like I did. When building the project you may face the following error:
Error CS0103 The name 'UserPicker' does not exist in the current
context ...\System\UserImpl.cs 142 Active
If you get that error make sure you target Win 10.0 Build 14393.

Multi-config Support - How to set application ID?

Does anyone know the method / commands to send, to enable and use multi-config support so I can store application specific data?
The SDK 2.0 Developer Guide mentions the AT*CONFIG_IDS command, but I'm not able to make it work. I'm trying the sample commands below:
// set the application ID
AT*CONFIG=12,"CUSTOM:application_id","2902050D"
// clear config ack
AT*CTRL=13,5,0
// set application description, using new app id
AT*CONFIG_IDS=14,"00000000","00000000","2902050D"
AT*CONFIG=15,"CUSTOM:application_desc","My SDK Test"
// clear config ack
AT*CTRL=16,5,0
// re-read config data
AT*CTRL=17,4,0
AT*CTRL=18,5,0
But in the returned config, nothing has changed:
custom:application_id = 00000000
custom:application_desc = Default application configuration
I've also tried prefixing the first CUSTOM:application_id config command with an CONFIG_IDS command but with no avail:
// set the application ID
AT*CONFIG_IDS=11,"00000000","00000000","00000000"
AT*CONFIG=12,"CUSTOM:application_id","2902050D"
Any ideas as to what I'm doing wrong?
After some trial and error, it seems that all configuration names should be all lower case; despite the category being upper cased in the Developer Guide examples.
Therefore the following works fine:
AT*CONFIG=12,"custom:application_id","2902050D"
AT*CTRL=13,5,0
AT*CONFIG_IDS=14,"00000000","00000000","2902050D"
AT*CONFIG=15,"custom:application_desc","My SDK Test"
AT*CTRL=16,5,0
AT*CTRL=17,4,0
AT*CTRL=18,5,0

Find element by Node ID

I'm in the middle of building a react-native app and running into problems trying to find an element by it's Node ID.
Some context:
I'm using a Form library for my register form that has a handleFormFocus function. This gets triggered anytime any one of the inputs are focused. The parameters provided to that function are the event and the component ID (integer number), neither of which give me any useful information about which input was actually focused (i.e. "email"), but instead leave me with only an ID.
When I was using react-native 0.34 I was able to do the following:
const ReactNativeComponentTree = require('react/lib/ReactNativeComponentTree');
let targetComponent = ReactNativeComponentTree.getInstanceFromNode(component);
let inputRef = targetComponent._currentElement.props.fieldRef;
but since updating to 0.41 this no longer works. I get the following error:
Unable to resolve module react/lib/ReactNativeComponentTree
Anyone know how to accomplish finding an element by its id with react native 0.41?
Thanks for your time!
React 0.41+:
import ReactNativeComponentTree from 'react-native/Libraries/Renderer/src/renderers/native/ReactNativeComponentTree';
React 0.51+:
import ReactNativeComponentTree from 'react-native/Libraries/Renderer/shims/ReactNativeComponentTree';

Enterprise Library Logging tracelistener extension issue with resolving ILogFormatter

I have been sitting with a problem for quite a while now and I just can't seem to find what I'm missing.
I have written a custom trace listener component for Enterprise Library 5.0 for the Logging application block which works but the configured ILogFormatter just won't resolve and so I always end up with the basic string text when it gets handled by my component.
I saw in the enterprise library source code that they use the "Container.ResolvedIfNotNull()" method. It doesn't seem to work for me. I need it to write out a custom formatted string for my component to use. You know, not just the message but the timestamp, machinename, threadId, etc.
Does anyone have any ideas on how to fix this?
Thanks in advance.
Like I've mentioned on this site: http://entlib.codeplex.com/discussions/261749
When you create your CreationExpression in the TraceListener data class make sure you have a flat constructor definition. To put it in other words, don't return:
() => new MyTraceListener(new TraceListenerConfig(..., Container.ResolvedIfNotNull<ILogFormatter>(), ...));
just have it in the constructor of the MyTraceListener:
() => new MyTraceListener(..., Container.ResolvedIfNotNull<ILogFormatter>(), ...);