-
Notifications
You must be signed in to change notification settings - Fork 0
AdsSimplifiedInterface
This constructor is mostly used for dependency injection. Inside the appsettings.json file, or other configuration method supported by IConfiguration, will be properties defining the ADS connection information.
{
"ADS": {
"NetId": "199.4.42.250.1.1",
"Port": 851,
"ScanRateMultiple": 10
}
}This is like calling the constructor below with the following mapping:
- AmsNetId = ADS.NetId
- Port = ADS.Port
- scanFrequency = ADS.ScanRateMultiple
This constructor is used when dependency injection is not needed and/or the ADS connection information is gotten from outside an IConfiguration compatible means (e.g. hard coded).
This is the AMS network identification. Normally this is a 6 byte address represents like how IP addresses are represented. The default for TwinCAT is the main Windows IP plus ".1.1" added to the end.
This is the port on the AMS network where the PLC is located. For the first PLC in a TwinCAT 3 runtime, this is 851. For the second, it is 852. For the third, it is 853. And so on.
This is the log system, which implements the Microsoft.Extensions.Logging.ILogger interface.
This is used to determine the base frequency that all notifications are based on. It is recommended to be the highest common denominator of all the notifications. This is what allows monitoring the same variable with different function calls on different frequencies (e.g. VarA is monitored for FuncA at 100 ms and FuncB at 1 sec).
This will call the GetValue method with the InstancePath, placing the results of the call in value and returning if an exception happened or not.
This will call the GetValue method with the InstancePath, placing the results of the call in value and returning if an exception happened or not.
Gets the data type of the variable at InstancePath and then invokes the typed version of the method.
This will attempt to get the variable's value at the InstancePath location in the PLC. It will return the marshalled data type specified as T.
The InstancePath was an empty string or the PLC returned an empty array for the data.
The InstancePath is not a valid value type, casting to a C# type failed, or the PLC is not connected.
The InstancePath is not a valid variable in the PLC.
The array has an unknown type of element.
The data type of T and the size of the data do not match.
This will call the SetValue method with the InstancePath and value, returning if an exception happened or not.
This will call the SetValue method with the InstancePath and value, returning if an exception happened or not.
Gets the data type of the variable at InstancePath and then invokes the typed version of the method.
This will attempt to set the variable's value at the InstancePath location in the PLC.
The InstancePath was an empty string or the PLC returned an empty array for the data.
The InstancePath points to the PLC variable marked as Read Only.
The InstancePath is not a valid value type, or the PLC is not connected.
The InstancePath is not a valid variable in the PLC.
This removes all notifications for the variable at InstancePath
This will add a notification to the PLC variable at InstancePath. The variable will be checked for changes every UpdateRate. When a change is detected, the Callback will be called with the InstancePath, the raw byte data of the old value, and the raw byte data of the new value (in that order).
The InstancePath was an empty string or the PLC returned an empty array for the data.
The InstancePath points to the PLC variable marked as Read Only.
The InstancePath is not a valid value type, or the PLC is not connected.
The InstancePath is not a valid variable in the PLC.
This will add a notification to the PLC variable at InstancePath. The variable will be checked for changes every UpdateRate. When a change is detected, the Callback will be called with the InstancePath, the marshalled value of the old value, and marshalled value of the new value (in that order).
The InstancePath was an empty string or the PLC returned an empty array for the data.
The InstancePath points to the PLC variable marked as Read Only.
The InstancePath is not a valid value type, or the PLC is not connected.
The InstancePath is not a valid variable in the PLC.
Generates the C# type which can be used to directly read/write the variable at the InstancePath location.
The InstancePath is not a valid variable in the PLC.
The data type of the variable (or the base type of a member of the data type) is not known, an enumeration underlying type is too large for TwinCAT, or a member of a union was marked as read only
A primitive type, which is not known yet, was attempted to be generated, or a string was inside a Union.
Generates the C# types, which can be used to directly read/write the variable at the InstancePath location, for all the types in the PLC.
The InstancePath is not a valid variable in the PLC.
The data type of the variable (or the base type of a member of the data type) is not known, an enumeration underlying type is too large for TwinCAT, or a member of a union was marked as read only
A primitive type, which is not known yet, was attempted to be generated, or a string was inside a Union.
Checks if a PLC variable is at the InstancePath location
Gets a list of the PLC variables starting at the startingPoint, if defined.
The parent to get all the children of.
This flag will cause the list to only include variables stored in the PLC's persistent memory location.
Gets the list of PLC variable type information for all the variables in the PLC or just the one specified by VariableName.