AFValue.CreateSystemStateValue with user defined digital system state

Discussion created by larkyal on Apr 4, 2014
Latest reply on Jun 20, 2014 by TelventDMS

I've recently started using the AF SDK to write data to PI via AF.


Using AFValue.CreateSystemStateValue with the AFSystemStateCode enum seems to work fine, however I'm looking to output a custom system state which I've defined.


i.e I've defined the digital system state 11 as "Off-load".  As this state is not contained in the enumeration set, I'm not sure how to write it to the point.


I've tried passing 11 as an integer to AFValue.CreateSystemStateValue, however this simply writes the number 11 to the point.  I believe under PISDK, you could simply pass the system state as a string, however AFSDK does not seem to support this.  I'd also rather avoid using PISDK just for this step as everything else is using AFSDK.


Has anyone else attempted something similar using AFSDK?


Thanks in advance