Workbackup - OPC Anbindung SGMs
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<?AutomationStudio Version="4.11.4.55 SP" WorkingVersion="4.11"?>
|
<?AutomationStudio Version="4.11.4.55 SP" WorkingVersion="4.11"?>
|
||||||
<Project Version="1.00.0" Edition="Standard" EditionComment="Standard" xmlns="http://br-automation.co.at/AS/Project">
|
<Project Version="1.00.0" Edition="Standard" EditionComment="Standard" xmlns="http://br-automation.co.at/AS/Project">
|
||||||
<Communication>
|
<Communication />
|
||||||
<OnlineConfiguration Name="KD_Reinraum" DeviceType="TCPIP" DeviceParameters="/IF=tcpip /LOPO=11159 /SA=1" ConnectionParameters="/COMT=2500 /RT=1000 /AM=* /SDT=5 /DAIP=192.168.0.230 /REPO=11159 /ANSL=1 /PT=11169" Description="" />
|
|
||||||
</Communication>
|
|
||||||
<ANSIC DefaultIncludes="true" />
|
<ANSIC DefaultIncludes="true" />
|
||||||
<IEC ExtendedConstants="true" IecExtendedComments="true" KeywordsAsStructureMembers="false" NamingConventions="true" Pointers="true" Preprocessor="false" />
|
<IEC ExtendedConstants="true" IecExtendedComments="true" KeywordsAsStructureMembers="false" NamingConventions="true" Pointers="true" Preprocessor="false" />
|
||||||
<Motion RestartAcoposParameter="true" RestartInitParameter="true" />
|
<Motion RestartAcoposParameter="true" RestartInitParameter="true" />
|
||||||
|
|||||||
736
Logical/Libraries/AsOpcUac/AsOpcUac.fun
Normal file
736
Logical/Libraries/AsOpcUac/AsOpcUac.fun
Normal file
@@ -0,0 +1,736 @@
|
|||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_Connect
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ServerEndpointUrl : STRING[255];
|
||||||
|
SessionConnectInfo : UASessionConnectInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_Disconnect
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_GetNamespaceIndex
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NamespaceUri : STRING[255];
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
NamespaceIndex : UINT;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_TranslatePath
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
StartNodeID : UANodeID;
|
||||||
|
RelativePath : STRING[255];
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
TargetNodeID : UANodeID;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_NodeGetHandle
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeID : UANodeID;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
NodeHdl : DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_NodeGetHandleList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeIDCount : UINT;
|
||||||
|
NodeIDs : ARRAY[0..MAX_INDEX_NODELIST] OF UANodeID;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
NodeHdls : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_NodeReleaseHandle
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_NodeReleaseHandleList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeHdlCount : UINT;
|
||||||
|
NodeHdls : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_NodeGetInfo
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeID : UANodeID;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
NodeInfo : UANodeInfo;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_SubscriptionCreate
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
PublishingEnable : BOOL;
|
||||||
|
Priority : BYTE;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
PublishingInterval : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_SubscriptionDelete
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_SubscriptionOperate
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
PublishingEnable : BOOL;
|
||||||
|
Priority : USINT;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Published : BOOL;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
PublishingInterval : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MonitoredItemAdd
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
NodeHdl : DWORD;
|
||||||
|
NodeAddInfo : UANodeAdditionalInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
MonitoredItemHdl : DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
Variable : STRING[255];
|
||||||
|
MonitoringSettings : UAMonitoringSettings;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MonitoredItemAddList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
NodeHdlCount : UINT;
|
||||||
|
NodeHdls : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
NodeAddInfos : ARRAY[0..MAX_INDEX_MONITORLIST] OF UANodeAdditionalInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
MonitoredItemHdls : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
Variables : ARRAY[0..MAX_INDEX_MONITORLIST] OF STRING[255];
|
||||||
|
MonitoringSettings : ARRAY[0..MAX_INDEX_MONITORLIST] OF UAMonitoringParameters;
|
||||||
|
ValuesChanged : ARRAY[0..MAX_INDEX_MONITORLIST] OF BOOL;
|
||||||
|
RemainingValueCount : ARRAY[0..MAX_INDEX_MONITORLIST] OF UINT;
|
||||||
|
TimeStamps : ARRAY[0..MAX_INDEX_MONITORLIST] OF DT;
|
||||||
|
NodeQualityIDs : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MonitoredItemRemove
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
MonitoredItemHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MonitoredItemRemoveList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
MonitoredItemHdlCount : UINT;
|
||||||
|
MonitoredItemHdls : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MonitoredItemOperate
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
MonitoredItemHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
ValueChanged : BOOL;
|
||||||
|
TimeStamp : DT;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
MonitoringSettings : UAMonitoringSettings;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MonitoredItemOperateList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
MonitoredItemHdlCount : UINT;
|
||||||
|
MonitoredItemHdls : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Published : BOOL;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_MONITORLIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_EventItemAdd
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
NodeHdl : DWORD;
|
||||||
|
EventType : UANodeID;
|
||||||
|
EventFieldSelectionCount: UINT;
|
||||||
|
EventFieldSelections : ARRAY[0..MAX_INDEX_EVENTFIELDSELECTION] OF UARelativePath;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
EventItemHdl : DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
EventFields : ARRAY[0..MAX_INDEX_EVENTFIELDSELECTION] OF STRING[MAX_LENGTH_VARIABLE];
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_EventItemRemove
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
EventItemHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_EventItemOperate
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
SubscriptionHdl : DWORD;
|
||||||
|
EventItemHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
EventProcessed : BOOL;
|
||||||
|
RemainingEventCount : INT;
|
||||||
|
FieldErrorIDs : ARRAY[0..MAX_INDEX_EVENTFIELDSELECTION] OF DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_Read
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeHdl : DWORD;
|
||||||
|
NodeAddInfo : UANodeAdditionalInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
TimeStamp : DT;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
Variable : STRING[255];
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_ReadList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeHdlCount : UINT;
|
||||||
|
NodeHdls : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
NodeAddInfo : ARRAY[0..MAX_INDEX_NODELIST] OF UANodeAdditionalInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
TimeStamps : ARRAY[0..MAX_INDEX_NODELIST] OF DT;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
Variables : ARRAY[0..MAX_INDEX_NODELIST] OF STRING[255];
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UaClt_ReadBulk
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeIDCount : UINT;
|
||||||
|
NodeIDs : UDINT;
|
||||||
|
NodeAddInfo : UDINT;
|
||||||
|
Variables : UDINT;
|
||||||
|
NodeErrorIDs : UDINT;
|
||||||
|
TimeStamps : UDINT;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_Write
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeHdl : DWORD;
|
||||||
|
NodeAddInfo : UANodeAdditionalInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
Variable : STRING[255];
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_WriteList
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeHdlCount : UINT;
|
||||||
|
NodeHdls : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
NodeAddInfo : ARRAY[0..MAX_INDEX_NODELIST] OF UANodeAdditionalInfo;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
NodeErrorIDs : ARRAY[0..MAX_INDEX_NODELIST] OF DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
Variables : ARRAY[0..MAX_INDEX_NODELIST] OF STRING[255];
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UaClt_WriteBulk
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
NodeIDCount : UINT;
|
||||||
|
NodeIDs : UDINT;
|
||||||
|
NodeAddInfo : UDINT;
|
||||||
|
Variables : UDINT;
|
||||||
|
NodeErrorIDs : UDINT;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MethodGetHandle
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
ObjectNodeID : UANodeID;
|
||||||
|
MethodNodeID : UANodeID;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
MethodHdl : DWORD;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MethodReleaseHandle
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
MethodHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_MethodCall
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
MethodHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_IN_OUT
|
||||||
|
InputArguments : ARRAY[0..MAX_INDEX_ARGUMENTS] OF UAMethodArgument;
|
||||||
|
OutputArguments : ARRAY[0..MAX_INDEX_ARGUMENTS] OF UAMethodArgument;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
i_tid : UDINT;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
|
|
||||||
|
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK UA_ConnectionGetStatus
|
||||||
|
VAR_INPUT
|
||||||
|
Execute : BOOL;
|
||||||
|
ConnectionHdl : DWORD;
|
||||||
|
Timeout : TIME;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR_OUTPUT
|
||||||
|
ConnectionStatus : UAConnectionStatus;
|
||||||
|
ServerState : UAServerState;
|
||||||
|
ServiceLevel : BYTE;
|
||||||
|
Done : BOOL;
|
||||||
|
Busy : BOOL;
|
||||||
|
Error : BOOL;
|
||||||
|
ErrorID : DWORD;
|
||||||
|
END_VAR
|
||||||
|
|
||||||
|
VAR
|
||||||
|
i_busy : BOOL;
|
||||||
|
END_VAR
|
||||||
|
END_FUNCTION_BLOCK
|
||||||
334
Logical/Libraries/AsOpcUac/AsOpcUac.typ
Normal file
334
Logical/Libraries/AsOpcUac/AsOpcUac.typ
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
|
||||||
|
TYPE
|
||||||
|
UASecurityMsgMode :
|
||||||
|
( (* Message security modes *)
|
||||||
|
UASecurityMsgMode_BestAvailable := 0, (* Detects best available mode the server provides (may result in no security) *)
|
||||||
|
UASecurityMsgMode_None := 1, (* No secure communication *)
|
||||||
|
UASecurityMsgMode_Sign := 2, (* Messages are signed to verify peer authenticity *)
|
||||||
|
UASecurityMsgMode_SignEncrypt := 3 (* Messages are signed and encrypted *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UASecurityPolicy :
|
||||||
|
( (* Security policies *)
|
||||||
|
UASecurityPolicy_BestAvailable := 0, (* Detects best available policy the server provides (may result in no security) *)
|
||||||
|
UASecurityPolicy_None := 1, (* No secure communication (Allowed only for security mode = none) *)
|
||||||
|
UASecurityPolicy_Basic128Rsa15 := 2, (* RSA-PKCS-#1-V1.5-SHA1/RSA-PKCS-#1-V1.5/128-512 bit, HMAC-SHA1/AES-128-CBC/16bit *)
|
||||||
|
UASecurityPolicy_Basic256 := 3, (* RSA-PKCS-#1-OAEP-SHA1/RSA-OAEP/128-512 bit, HMAC-SHA1/AES-256-CBC/32bit *)
|
||||||
|
UASecurityPolicy_Basic256Sha256 := 4 (* RSA-PKCS-#1-OAEP-SHA1/RSA-OAEP/256-512 bit, HMAC-SHA1/AES-256-CBC/32bit *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UATransportProfile :
|
||||||
|
( (* Transport profiles to select encoding and protocol *)
|
||||||
|
UATP_UATcp := 1, (* UA Binary over TCP *)
|
||||||
|
UATP_WSHttpBinary := 2, (* Binary over HTTP Not supported by B&R *)
|
||||||
|
UATP_WSHttpXmlOrBinary := 3, (* XML/Binary over HTTP Not supported by B&R *)
|
||||||
|
UATP_WSHttpXml := 4 (* XML over HTTP Not supported by B&R *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UAUserIdentityTokenTtype :
|
||||||
|
( (* Authentication token type provided for logon *)
|
||||||
|
UAUITT_Anonymous := 0, (* Logon anonymously *)
|
||||||
|
UAUITT_Username := 1, (* Logon with user name and password *)
|
||||||
|
UAUITT_x509 := 2 (* Logon with user certificate *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UAIdentifierType :
|
||||||
|
( (* Node identifier type *)
|
||||||
|
UAIdentifierType_String := 1, (* String *)
|
||||||
|
UAIdentifierType_Numeric := 2, (* Numeric value *)
|
||||||
|
UAIdentifierType_GUID := 3, (* GUID *)
|
||||||
|
UAIdentifierType_Opaque := 4 (* ByteString *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UADeadbandType :
|
||||||
|
( (* Deadband type for monitored item sampling *)
|
||||||
|
UADeadbandType_None := 0, (* No deadband, each value change is sampled *)
|
||||||
|
UADeadbandType_Absolute := 1, (* Absolute value to exceed from last sample to make new sample *)
|
||||||
|
UADeadbandType_Percent := 2 (* Percent of EURange to exceed from last sample to make new sample *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UANodeClass :
|
||||||
|
( (* Node classes defined through the OPC-UA standard *)
|
||||||
|
UANodeClass_None := 0,
|
||||||
|
UANodeClass_Object := 1,
|
||||||
|
UANodeClass_Variable := 2,
|
||||||
|
UANodeClass_Method := 4,
|
||||||
|
UANodeClass_ObjectType := 8,
|
||||||
|
UANodeClass_VariableType := 16,
|
||||||
|
UANodeClass_ReferenceType := 32,
|
||||||
|
UANodeClass_DataType := 64,
|
||||||
|
UANodeClass_View := 128,
|
||||||
|
UANodeClass_All := 255
|
||||||
|
);
|
||||||
|
|
||||||
|
UAAttributeId :
|
||||||
|
( (* Attributes defined through the OPC-UA standard *)
|
||||||
|
UAAI_Default := 0,
|
||||||
|
UAAI_NodeId := 1,
|
||||||
|
UAAI_NodeClass := 2,
|
||||||
|
UAAI_BrowseName := 3,
|
||||||
|
UAAI_DisplayName := 4,
|
||||||
|
UAAI_Description := 5,
|
||||||
|
UAAI_WriteMask := 6,
|
||||||
|
UAAI_UserWriteMask := 7,
|
||||||
|
UAAI_IsAbstract := 8,
|
||||||
|
UAAI_Symmetric := 9,
|
||||||
|
UAAI_InverseName := 10,
|
||||||
|
UAAI_ContainsNoLoops := 11,
|
||||||
|
UAAI_EventNotifier := 12,
|
||||||
|
UAAI_Value := 13,
|
||||||
|
UAAI_DataType := 14,
|
||||||
|
UAAI_ValueRank := 15,
|
||||||
|
UAAI_ArrayDimensions := 16,
|
||||||
|
UAAI_AccessLevel := 17,
|
||||||
|
UAAI_UserAccessLevel := 18,
|
||||||
|
UAAI_MinimumSamplingInterval := 19,
|
||||||
|
UAAI_Historizing := 20,
|
||||||
|
UAAI_Executable := 21,
|
||||||
|
UAAI_UserExecutable := 22
|
||||||
|
);
|
||||||
|
|
||||||
|
UAConnectionStatus :
|
||||||
|
( (* Status of the underlying connection *)
|
||||||
|
UACS_Connected := 0,
|
||||||
|
UACS_ConnectionError := 1,
|
||||||
|
UACS_Shutdown := 2
|
||||||
|
);
|
||||||
|
|
||||||
|
UAServerState :
|
||||||
|
( (* State of the server *)
|
||||||
|
UASS_Running := 0, (* The server has successfully completed the start-up and can be used *)
|
||||||
|
UASS_Failed := 1, (* An error occurred during server start-up. The Server is no longer functioning *)
|
||||||
|
UASS_NoConfiguration := 2, (* The Server is running but has no configuration information loaded and therefore does not transfer data *)
|
||||||
|
UASS_Suspended := 3, (* The Server has been temporarily suspended and is not receiving or sending data *)
|
||||||
|
UASS_Shutdown := 4, (* The server has not yet completed the start-up or has been shut down *)
|
||||||
|
UASS_Test := 5, (* The Server is in test mode *)
|
||||||
|
UASS_CommunicationFault := 6, (* The Server is running properly, but is having difficulty accessing data from its data sources *)
|
||||||
|
UASS_Unknown := 7 (* The Server does not know the state of underlying system *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UAVariantType :
|
||||||
|
( (* Kind of the variant data *)
|
||||||
|
UAVariantType_Null := 0, (* No data *)
|
||||||
|
UAVariantType_Boolean := 1, (* Data in element Boolean *)
|
||||||
|
UAVariantType_SByte := 2, (* Data in element SByte *)
|
||||||
|
UAVariantType_Byte := 3, (* Data in element Byte *)
|
||||||
|
UAVariantType_Int16 := 4, (* Data in element Int16 *)
|
||||||
|
UAVariantType_UInt16 := 5, (* Data in element UInt16 *)
|
||||||
|
UAVariantType_Int32 := 6, (* Data in element Int32 *)
|
||||||
|
UAVariantType_UInt32 := 7, (* Data in element UInt32 *)
|
||||||
|
UAVariantType_Int64 := 8, (* Data in element Int64 *)
|
||||||
|
UAVariantType_UInt64 := 9, (* Data in element UInt64 *)
|
||||||
|
UAVariantType_Float := 10, (* Data in element Float *)
|
||||||
|
UAVariantType_Double := 11, (* Data in element Double *)
|
||||||
|
UAVariantType_String := 12, (* Data in element String *)
|
||||||
|
UAVariantType_DateTime := 13, (* Data in element DateTime *)
|
||||||
|
UAVariantType_Guid := 14, (* Guid data in element String *)
|
||||||
|
UAVariantType_ByteString := 15, (* Byte string in element String *)
|
||||||
|
UAVariantType_XmlElement := 16, (* XML data in element String *)
|
||||||
|
UAVariantType_NodeId := 17, (* Data in element NodeId *)
|
||||||
|
UAVariantType_ExpandedNodeId := 18, (* Data in element ExpandedNodeId *)
|
||||||
|
UAVariantType_StatusCode := 19, (* Status code in element UInt32 *)
|
||||||
|
UAVariantType_QualifiedName := 20, (* Data in element QualifiedName *)
|
||||||
|
UAVariantType_LocalizedText := 21 (* Data in element LocalizedText *)
|
||||||
|
);
|
||||||
|
|
||||||
|
UAArrayLength : DINT; (* Arraylength of value attribute in AttributeRead and AttributeWrite services *)
|
||||||
|
|
||||||
|
UANoOfElements : DINT; (* Number of elements for arrays nested in structures *)
|
||||||
|
|
||||||
|
UAUserIdentityToken : STRUCT (* Identity token for authentication on an OPC-UA server *)
|
||||||
|
UserIdentityTokenType : UAUserIdentityTokenTtype;
|
||||||
|
TokenParam1 : STRING[255];
|
||||||
|
TokenParam2 : STRING[255];
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UASessionConnectInfo : STRUCT (* Session information and parameters *)
|
||||||
|
SessionName : STRING[255];
|
||||||
|
ApplicationName : STRING[255];
|
||||||
|
SecurityMsgMode : UASecurityMsgMode;
|
||||||
|
SecurityPolicy : UASecurityPolicy;
|
||||||
|
CertificateStore : STRING[255];
|
||||||
|
ClientCertificateName : STRING[255];
|
||||||
|
ServerUri : STRING[255];
|
||||||
|
CheckServerCertificate : BOOL;
|
||||||
|
TransportProfile : UATransportProfile;
|
||||||
|
UserIdentityToken : UAUserIdentityToken;
|
||||||
|
VendorSpecificParameter : STRING[255];
|
||||||
|
SessionTimeout : TIME;
|
||||||
|
MonitorConnection : TIME;
|
||||||
|
LocaleIDs : ARRAY[0..4] OF STRING[6];
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UANodeID : STRUCT (* Node identifier used to address nodes on the server *)
|
||||||
|
NamespaceIndex : UINT; (* Index of the namespace which contains the node *)
|
||||||
|
Identifier : STRING[255]; (* Node identifier according to the identifier types format *)
|
||||||
|
IdentifierType : UAIdentifierType; (* String, Numeric, GUID, ByteString *)
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAMonitoringSettings : STRUCT (* Settings for data item monitoring *)
|
||||||
|
SamplingInterval : TIME; (* Time in ms *)
|
||||||
|
DeadbandType : UADeadbandType; (* Deadband type which applies to deadband value *)
|
||||||
|
Deadband : REAL; (* Deadband value, semantics depending on DeadbandType *)
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAMonitoringParameters : STRUCT (* Settings for data item monitoring *)
|
||||||
|
SamplingInterval : TIME; (* Time in ms *)
|
||||||
|
QueueSize : UINT; (* Size of the server sided queue to collect value changes *)
|
||||||
|
DiscardOldest : BOOL; (* True to discard oldest on queue overflow or newest otherwise *)
|
||||||
|
DeadbandType : UADeadbandType; (* Deadband type which applies to deadband value *)
|
||||||
|
Deadband : REAL; (* Deadband value, semantics depending on DeadbandType *)
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UALocalizedText : STRUCT (* Localized text with locale identifer and text *)
|
||||||
|
Locale : STRING[6];
|
||||||
|
Text : STRING[255];
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UANodeInfo : STRUCT (* Node attribute values *)
|
||||||
|
AccessLevel : BYTE;
|
||||||
|
ArrayDimension : ARRAY[0..MAX_INDEX_ARRAYDIMENSION] OF UDINT;
|
||||||
|
BrowseName : STRING[255];
|
||||||
|
ContainsNoLoops : BOOL;
|
||||||
|
DataType : UANodeID;
|
||||||
|
Description : UALocalizedText;
|
||||||
|
DisplayName : UALocalizedText;
|
||||||
|
EventNotifier : BYTE;
|
||||||
|
Executable : BOOL;
|
||||||
|
Historizing : BOOL;
|
||||||
|
InverseName : STRING[255];
|
||||||
|
IsAbstract : BOOL;
|
||||||
|
MinimumSamplingInterval : TIME;
|
||||||
|
NodeClass : UANodeClass;
|
||||||
|
NodeID : UANodeID;
|
||||||
|
Symmetric : BOOL;
|
||||||
|
UserAccessLevel : BYTE;
|
||||||
|
UserExecutable : BOOL;
|
||||||
|
UserWriteMask : UDINT;
|
||||||
|
ValueRank : DINT;
|
||||||
|
WriteMask : UDINT;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAIndexRange : STRUCT (* Index range used for indexed access on arrays *)
|
||||||
|
StartIndex : UINT;
|
||||||
|
EndIndex : UINT;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UANodeAdditionalInfo : STRUCT (* Additional info for reading and writing node attributes *)
|
||||||
|
AttributeId : UAAttributeId;
|
||||||
|
IndexRangeCount : UINT;
|
||||||
|
IndexRange : ARRAY[0..MAX_INDEX_INDEXRANGE] OF UAIndexRange;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAMethodArgument : STRUCT (* Method argument used to supply the input and receive the output argument values for method calls *)
|
||||||
|
Name : STRING[64]; (* Name of the method argument *)
|
||||||
|
Value : STRING[255]; (* Source/Destination variable name for the argument value *)
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAByteString : STRUCT (* Byte string containing length and data *)
|
||||||
|
Length : DINT;
|
||||||
|
Data : ARRAY[0..MAX_INDEX_BYTESTRING] OF USINT;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAExpandedNodeID : STRUCT (* Expanded node identfier type *)
|
||||||
|
NodeId : UANodeID;
|
||||||
|
NamespaceUri : STRING[255];
|
||||||
|
ServerIndex : UDINT;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAQualifiedName : STRUCT (* Qualified name type *)
|
||||||
|
NamespaceIndex : UINT;
|
||||||
|
Name : STRING[255];
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UARelativePathElement : STRUCT (* Relative path element used to build a relative path *)
|
||||||
|
ReferenceTypeId : UANodeID;
|
||||||
|
IsInverse : BOOL;
|
||||||
|
IncludeSubTypes : BOOL;
|
||||||
|
TargetName : UAQualifiedName;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UARelativePath : STRUCT (* Relative path used to translate and browse nodes *)
|
||||||
|
NoOfElements : DWORD;
|
||||||
|
Elements : ARRAY[0..MAX_INDEX_RELATIVEPATH] OF UARelativePathElement;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UADataValue : STRUCT (* Additional informations about data value *)
|
||||||
|
Valid : BOOL;
|
||||||
|
Reserved : ARRAY[0..2]OF USINT;
|
||||||
|
StatusCode : UDINT;
|
||||||
|
SourceTimestamp : DATE_AND_TIME;
|
||||||
|
ServerTimestamp : DATE_AND_TIME;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAVariantData : STRUCT (* Standard type for variant data *)
|
||||||
|
VariantType : UAVariantType;
|
||||||
|
Boolean : BOOL;
|
||||||
|
SByte : SINT;
|
||||||
|
Byte : USINT;
|
||||||
|
Int16 : INT;
|
||||||
|
UInt16 : UINT;
|
||||||
|
Int32 : DINT;
|
||||||
|
UInt32 : UDINT;
|
||||||
|
Float : REAL;
|
||||||
|
Double : LREAL;
|
||||||
|
DateTime : DATE_AND_TIME;
|
||||||
|
String : STRING[255];
|
||||||
|
NodeId : UANodeID;
|
||||||
|
ExpandedNodeId : UAExpandedNodeID;
|
||||||
|
QualifiedName : UAQualifiedName;
|
||||||
|
LocalizedText : UALocalizedText;
|
||||||
|
DataValue : UADataValue;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UARange : STRUCT (* Range for a value *)
|
||||||
|
Low : LREAL;
|
||||||
|
High : LREAL;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UAEUInformation : STRUCT (* Information about the engineering units *)
|
||||||
|
NamespaceUri : STRING[255];
|
||||||
|
UnitId : DINT;
|
||||||
|
DisplayName : UALocalizedText;
|
||||||
|
Description : UALocalizedText;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
UATimeZoneData : STRUCT (* Information about time zone *)
|
||||||
|
TimeOffset : INT; (* Offset in minutes from UTC *)
|
||||||
|
DaylightSaving : BOOL; (* Offset includes the DST *)
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
BrUaNodeId : UANodeID;
|
||||||
|
BrUaQualifiedName : UAQualifiedName;
|
||||||
|
BrUaLocalizedText : UALocalizedText;
|
||||||
|
BrUaByteString : UAByteString;
|
||||||
|
BrUaGuidString : STRING[36];
|
||||||
|
|
||||||
|
BrUaXmlElement : STRUCT
|
||||||
|
Length : DINT;
|
||||||
|
Data : STRING[65535];
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
BrUaImageBMP : STRUCT
|
||||||
|
Length : DINT;
|
||||||
|
Data : ARRAY[0..6291455] OF USINT;
|
||||||
|
END_STRUCT;
|
||||||
|
BrUaImageGIF : STRUCT
|
||||||
|
Length : DINT;
|
||||||
|
Data : ARRAY[0..524287] OF USINT;
|
||||||
|
END_STRUCT;
|
||||||
|
BrUaImageJPG : STRUCT
|
||||||
|
Length : DINT;
|
||||||
|
Data : ARRAY[0..1048575] OF USINT;
|
||||||
|
END_STRUCT;
|
||||||
|
BrUaImagePNG : STRUCT
|
||||||
|
Length : DINT;
|
||||||
|
Data : ARRAY[0..2621439] OF USINT;
|
||||||
|
END_STRUCT;
|
||||||
|
|
||||||
|
BrUaDuration : LREAL;
|
||||||
|
BrUaLocaleIdString : STRING[6];
|
||||||
|
|
||||||
|
BrUaTimeZoneDataType : UATimeZoneData;
|
||||||
|
|
||||||
|
END_TYPE
|
||||||
24
Logical/Libraries/AsOpcUac/AsOpcUac.var
Normal file
24
Logical/Libraries/AsOpcUac/AsOpcUac.var
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
VAR CONSTANT
|
||||||
|
MAX_LENGTH_VARIABLE : UINT := 255;
|
||||||
|
MAX_LENGTH_BYTESTRING : UINT := 1024;
|
||||||
|
|
||||||
|
MAX_ELEMENTS_ARRAYDIMENSION : UINT := 7; (* B&R supports arrays with 7 dimensions *)
|
||||||
|
MAX_ELEMENTS_INDEXRANGE : UINT := 8; (* Index range addresses max number of dimensions +1 for string/bytestring index *)
|
||||||
|
MAX_ELEMENTS_NODELIST : UINT := 64; (* Maximum number of items the node list functions can handle *)
|
||||||
|
MAX_ELEMENTS_MONITORLIST : UINT := 64; (* Maximum number of elements the monitored item list functions can handle *)
|
||||||
|
MAX_ELEMENTS_ARGUMENTS : UINT := 10; (* Maximum number of input and output arguments for method call *)
|
||||||
|
MAX_ELEMENTS_EVENTFIELDSELECTION : UINT := 64;
|
||||||
|
MAX_ELEMENTS_RELATIVEPATH : UINT := 16;
|
||||||
|
|
||||||
|
(* B&R requires zero based arrays in .typ and .fun files, calculations like "const - 1" are not allowed
|
||||||
|
for declarations in those files, so other constants denoting the array upper limit are declared *)
|
||||||
|
MAX_INDEX_ARRAYDIMENSION : UINT := MAX_ELEMENTS_ARRAYDIMENSION - 1;
|
||||||
|
MAX_INDEX_INDEXRANGE : UINT := MAX_ELEMENTS_INDEXRANGE - 1;
|
||||||
|
MAX_INDEX_NODELIST : UINT := MAX_ELEMENTS_NODELIST - 1;
|
||||||
|
MAX_INDEX_MONITORLIST : UINT := MAX_ELEMENTS_MONITORLIST - 1;
|
||||||
|
MAX_INDEX_ARGUMENTS : UINT := MAX_ELEMENTS_ARGUMENTS - 1;
|
||||||
|
MAX_INDEX_EVENTFIELDSELECTION : UINT := MAX_ELEMENTS_EVENTFIELDSELECTION - 1;
|
||||||
|
MAX_INDEX_RELATIVEPATH : UINT := MAX_ELEMENTS_RELATIVEPATH - 1;
|
||||||
|
MAX_INDEX_BYTESTRING : UINT := MAX_LENGTH_BYTESTRING - 1;
|
||||||
|
END_VAR
|
||||||
1096
Logical/Libraries/AsOpcUac/SG4/AsOpcUac.h
Normal file
1096
Logical/Libraries/AsOpcUac/SG4/AsOpcUac.h
Normal file
File diff suppressed because it is too large
Load Diff
12
Logical/Libraries/AsOpcUac/binary.lby
Normal file
12
Logical/Libraries/AsOpcUac/binary.lby
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<?AutomationStudio FileVersion="4.9"?>
|
||||||
|
<Library SubType="binary" Description="The AsOpcUac library supports communication with OPC-UA servers" xmlns="http://br-automation.co.at/AS/Library">
|
||||||
|
<Files>
|
||||||
|
<File>AsOpcUac.fun</File>
|
||||||
|
<File>AsOpcUac.typ</File>
|
||||||
|
<File>AsOpcUac.var</File>
|
||||||
|
</Files>
|
||||||
|
<Dependencies>
|
||||||
|
<Dependency ObjectName="runtime" />
|
||||||
|
</Dependencies>
|
||||||
|
</Library>
|
||||||
@@ -17,5 +17,6 @@
|
|||||||
<Object Type="Library" Language="binary" Description="The AsString Library contains FBKs for memory and character string handling.">asstring</Object>
|
<Object Type="Library" Language="binary" Description="The AsString Library contains FBKs for memory and character string handling.">asstring</Object>
|
||||||
<Object Type="Library" Language="binary" Description="This library integrates mathematical functions such as angle functions, rounding off, etc. into the program.">AsBrMath</Object>
|
<Object Type="Library" Language="binary" Description="This library integrates mathematical functions such as angle functions, rounding off, etc. into the program.">AsBrMath</Object>
|
||||||
<Object Type="Library" Language="binary" Description="This library contains FBKs for exchanging and formatting data (message based) via HTTP (TCP).">AsHttp</Object>
|
<Object Type="Library" Language="binary" Description="This library contains FBKs for exchanging and formatting data (message based) via HTTP (TCP).">AsHttp</Object>
|
||||||
|
<Object Type="Library" Language="binary" Description="The AsOpcUac library supports communication with OPC-UA servers">AsOpcUac</Object>
|
||||||
</Objects>
|
</Objects>
|
||||||
</Package>
|
</Package>
|
||||||
30
Logical/Machine/Arburg.md
Normal file
30
Logical/Machine/Arburg.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
Maschinennummer f90000
|
||||||
|
Identifier 117672
|
||||||
|
Betriebsart f80001 (Probleme)
|
||||||
|
Identifier 117622
|
||||||
|
|
||||||
|
Auftragstückzahl Production Control f076
|
||||||
|
Identifier 238994
|
||||||
|
Int32
|
||||||
|
|
||||||
|
Gutteile Production Control f077
|
||||||
|
Identifier 239002
|
||||||
|
Int32
|
||||||
|
|
||||||
|
Schlechtteile Production Control f087
|
||||||
|
Identifier 239020
|
||||||
|
Int32
|
||||||
|
|
||||||
|
Zeit bis Auftragende Tage Production Control t080
|
||||||
|
Identifier 238962
|
||||||
|
Int32
|
||||||
|
|
||||||
|
Zeit bis Auftragende Stunden Minuten Production Control t081
|
||||||
|
Identifier 238972
|
||||||
|
Float
|
||||||
|
|
||||||
|
Durschnittliche Zykluszeit Sec Pdoduction Control t085
|
||||||
|
Identifier 416422
|
||||||
|
Float
|
||||||
|
|
||||||
|
Störungsursache Hostcomputer f0209
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
<Object Type="Program" Language="IEC" Description="Anlagenzustand">ConMon</Object>
|
<Object Type="Program" Language="IEC" Description="Anlagenzustand">ConMon</Object>
|
||||||
<Object Type="DataObject" Language="Simple" Description="Modbusdaten CDE Klimaanlage">AIRConf</Object>
|
<Object Type="DataObject" Language="Simple" Description="Modbusdaten CDE Klimaanlage">AIRConf</Object>
|
||||||
<Object Type="Program" Language="IEC" Description="Mail verschicken">SendMail</Object>
|
<Object Type="Program" Language="IEC" Description="Mail verschicken">SendMail</Object>
|
||||||
<Object Type="Program" Language="IEC">PushNot</Object>
|
<Object Type="Program" Language="IEC" Description="Pushnachrichten mit Pushover">PushNot</Object>
|
||||||
|
<Object Type="Program" Language="IEC" Description="OPCUA mit SDM">SGM</Object>
|
||||||
|
<Object Type="File">Arburg.md</Object>
|
||||||
</Objects>
|
</Objects>
|
||||||
</Package>
|
</Package>
|
||||||
96
Logical/Machine/SGM/Cyclic.st
Normal file
96
Logical/Machine/SGM/Cyclic.st
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
|
||||||
|
PROGRAM _CYCLIC
|
||||||
|
usi:=2;
|
||||||
|
//Verbindung aufbauen
|
||||||
|
|
||||||
|
FUBs.UA_Connect[usi]();
|
||||||
|
IF NOT FUBs.UA_Connect[usi].Busy THEN
|
||||||
|
FUBs.UA_Connect[usi].Execute := FALSE;
|
||||||
|
IF FUBs.UA_Connect[usi].Done THEN
|
||||||
|
ConnectionHdl[usi] := FUBs.UA_Connect[usi].ConnectionHdl;
|
||||||
|
FUBs.UA_GetNamespaceIndex[usi].Execute := TRUE;
|
||||||
|
END_IF
|
||||||
|
IF FUBs.UA_Connect[usi].Error THEN
|
||||||
|
ConnectionHdl[usi] := 0;
|
||||||
|
END_IF
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
|
||||||
|
FUBs.UA_GetNamespaceIndex[usi].ConnectionHdl := ConnectionHdl[usi];
|
||||||
|
|
||||||
|
FUBs.UA_GetNamespaceIndex[usi].Timeout := t#5s;
|
||||||
|
FUBs.UA_GetNamespaceIndex[usi] ();
|
||||||
|
IF NOT FUBs.UA_GetNamespaceIndex[usi].Busy THEN
|
||||||
|
FUBs.UA_GetNamespaceIndex[usi].Execute := FALSE;
|
||||||
|
IF FUBs.UA_GetNamespaceIndex[usi].Done THEN
|
||||||
|
uiNamespaceIndex[usi] := FUBs.UA_GetNamespaceIndex[usi].NamespaceIndex;
|
||||||
|
FUBs.UA_NodeGetHandle[usi].Execute := TRUE;
|
||||||
|
END_IF
|
||||||
|
IF FUBs.UA_GetNamespaceIndex[usi].Error THEN
|
||||||
|
uiNamespaceIndex[usi] := 0;
|
||||||
|
END_IF
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
FUBs.UA_TranslatepPath[usi].ConnectionHdl := ConnectionHdl[usi];
|
||||||
|
FUBs.UA_TranslatepPath[usi].StartNodeID.NamespaceIndex := 2;
|
||||||
|
FUBs.UA_TranslatepPath[usi].StartNodeID.IdentifierType := UAIdentifierType_Numeric;
|
||||||
|
FUBs.UA_TranslatepPath[usi].StartNodeID.Identifier := '1148331';
|
||||||
|
FUBs.UA_TranslatepPath[usi].RelativePath := '/2:MachineData/2:f80001/2:Value';
|
||||||
|
FUBs.UA_TranslatepPath[usi] ();
|
||||||
|
IF NOT FUBs.UA_TranslatepPath[usi].Busy THEN
|
||||||
|
FUBs.UA_TranslatepPath[usi].Execute := FALSE;
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
UANodeIDs[usi].NamespaceIndex := uiNamespaceIndex[usi];
|
||||||
|
//UANodeIDs[usi].Identifier := '/Root/Objects/2:ARBURG/2:Alarms/2:f2070';
|
||||||
|
UANodeIDs[usi].IdentifierType := UAIdentifierType_Numeric;
|
||||||
|
FUBs.UA_NodeGetHandle[usi].ConnectionHdl := ConnectionHdl[usi];
|
||||||
|
FUBs.UA_NodeGetHandle[usi].NodeID := UANodeIDs[usi];
|
||||||
|
FUBs.UA_NodeGetHandle[usi].Timeout := T#10s;
|
||||||
|
FUBs.UA_NodeGetHandle[usi]();
|
||||||
|
IF NOT FUBs.UA_NodeGetHandle[usi].Busy THEN
|
||||||
|
FUBs.UA_NodeGetHandle[usi].Execute := FALSE;
|
||||||
|
IF FUBs.UA_NodeGetHandle[usi].Done THEN
|
||||||
|
NodeHdl[usi] := FUBs.UA_NodeGetHandle[usi].NodeHdl;
|
||||||
|
END_IF
|
||||||
|
IF FUBs.UA_NodeGetHandle[usi].Error THEN
|
||||||
|
NodeHdl[usi] := 0;
|
||||||
|
dwUA_NodeGetHandleErrorID[usi] := FUBs.UA_NodeGetHandle[usi].ErrorID;
|
||||||
|
END_IF
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
UANodeAdditionalInfos[usi].AttributeId := UAAI_Value;
|
||||||
|
UANodeAdditionalInfos[usi].IndexRangeCount := 0;
|
||||||
|
FUBs.UA_NodeRead[usi].Execute;
|
||||||
|
FUBs.UA_NodeRead[usi].ConnectionHdl := ConnectionHdl[usi];
|
||||||
|
FUBs.UA_NodeRead[usi].NodeHdl := NodeHdl[usi];
|
||||||
|
FUBs.UA_NodeRead[usi].NodeAddInfo := UANodeAdditionalInfos[usi];
|
||||||
|
FUBs.UA_NodeRead[usi].Timeout := T#10s;
|
||||||
|
sVariableName := '::SGM:diTest';
|
||||||
|
FUBs.UA_NodeRead[usi] (Variable := sVariableName);
|
||||||
|
IF NOT FUBs.UA_NodeRead[usi].Busy THEN
|
||||||
|
FUBs.UA_NodeRead[usi].Execute := FALSE;
|
||||||
|
IF FUBs.UA_NodeRead[usi].Done THEN
|
||||||
|
// VarB := VarA;
|
||||||
|
END_IF
|
||||||
|
IF FUBs.UA_NodeRead[usi].Error THEN
|
||||||
|
//VarA := 0;
|
||||||
|
//VarB := 0;
|
||||||
|
END_IF
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
FUBs.UA_NodeReleaseHandle[usi].ConnectionHdl:= ConnectionHdl[usi];
|
||||||
|
FUBs.UA_NodeReleaseHandle[usi].NodeHdl := NodeHdl[usi];
|
||||||
|
FUBs.UA_NodeReleaseHandle[usi] ();
|
||||||
|
IF NOT FUBs.UA_NodeReleaseHandle[usi].Busy THEN
|
||||||
|
FUBs.UA_NodeReleaseHandle[usi].Execute := FALSE;
|
||||||
|
IF FUBs.UA_NodeReleaseHandle[usi].Done THEN
|
||||||
|
NodeHdl[usi] := 0;
|
||||||
|
END_IF
|
||||||
|
IF FUBs.UA_NodeReleaseHandle[usi].Error THEN
|
||||||
|
//Todo
|
||||||
|
END_IF
|
||||||
|
END_IF
|
||||||
|
|
||||||
|
|
||||||
|
END_PROGRAM
|
||||||
6
Logical/Machine/SGM/Exit.st
Normal file
6
Logical/Machine/SGM/Exit.st
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
PROGRAM _EXIT
|
||||||
|
(* Insert code here *)
|
||||||
|
|
||||||
|
END_PROGRAM
|
||||||
11
Logical/Machine/SGM/IEC.prg
Normal file
11
Logical/Machine/SGM/IEC.prg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<?AutomationStudio FileVersion="4.9"?>
|
||||||
|
<Program SubType="IEC" xmlns="http://br-automation.co.at/AS/Program">
|
||||||
|
<Files>
|
||||||
|
<File Description="Cyclic code">Cyclic.st</File>
|
||||||
|
<File Description="Init code">Init.st</File>
|
||||||
|
<File Description="Exit code">Exit.st</File>
|
||||||
|
<File Description="Local data types" Private="true">Types.typ</File>
|
||||||
|
<File Description="Local variables" Private="true">Variables.var</File>
|
||||||
|
</Files>
|
||||||
|
</Program>
|
||||||
28
Logical/Machine/SGM/Init.st
Normal file
28
Logical/Machine/SGM/Init.st
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
|
||||||
|
PROGRAM _INIT
|
||||||
|
FOR usi:=1 TO usNrSGMs DO
|
||||||
|
UASessionConnectInfoSG[usi].SecurityMsgMode := UASecurityMsgMode_None;
|
||||||
|
UASessionConnectInfoSG[usi].SecurityPolicy := UASecurityPolicy_None;
|
||||||
|
UASessionConnectInfoSG[usi].TransportProfile := UATP_UATcp;
|
||||||
|
UASessionConnectInfoSG[usi].UserIdentityToken.UserIdentityTokenType := UAUITT_Username;
|
||||||
|
UASessionConnectInfoSG[usi].UserIdentityToken.TokenParam1 := 'host_computer';
|
||||||
|
UASessionConnectInfoSG[usi].UserIdentityToken.TokenParam2 := '';
|
||||||
|
UASessionConnectInfoSG[usi].SessionTimeout := T#1m;
|
||||||
|
UASessionConnectInfoSG[usi].MonitorConnection := T#10s;
|
||||||
|
END_FOR;
|
||||||
|
|
||||||
|
usi:=2;
|
||||||
|
|
||||||
|
FUBs.UA_Connect[usi].Execute := TRUE;
|
||||||
|
FUBs.UA_Connect[usi].ServerEndpointUrl := 'opc.tcp://10.30.1.11:4880/Arburg';
|
||||||
|
FUBs.UA_Connect[usi].SessionConnectInfo := UASessionConnectInfoSG[usi];
|
||||||
|
FUBs.UA_Connect[usi].Timeout := T#10s;
|
||||||
|
|
||||||
|
//Namespace festlegen
|
||||||
|
FUBs.UA_GetNamespaceIndex[usi].NamespaceUri := 'http://www.arburg.com/';
|
||||||
|
|
||||||
|
|
||||||
|
UANodeIDs[usi].Identifier := '117672';
|
||||||
|
|
||||||
|
END_PROGRAM
|
||||||
12
Logical/Machine/SGM/Types.typ
Normal file
12
Logical/Machine/SGM/Types.typ
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
TYPE
|
||||||
|
typ_FUBs : STRUCT
|
||||||
|
UA_Connect : ARRAY[1..usNrSGMs]OF UA_Connect;
|
||||||
|
UA_GetNamespaceIndex : ARRAY[1..usNrSGMs]OF UA_GetNamespaceIndex;
|
||||||
|
UA_NodeGetHandle : ARRAY[1..usNrSGMs]OF UA_NodeGetHandle;
|
||||||
|
UA_NodeRead : ARRAY[1..usNrSGMs]OF UA_Read;
|
||||||
|
UA_NodeReleaseHandle : ARRAY[1..usNrSGMs]OF UA_NodeReleaseHandle;
|
||||||
|
UA_DisConnect : ARRAY[1..usNrSGMs]OF UA_Connect;
|
||||||
|
UA_TranslatepPath : ARRAY[1..usNrSGMs]OF UA_TranslatePath;
|
||||||
|
END_STRUCT;
|
||||||
|
END_TYPE
|
||||||
19
Logical/Machine/SGM/Variables.var
Normal file
19
Logical/Machine/SGM/Variables.var
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
VAR
|
||||||
|
usi : USINT;
|
||||||
|
END_VAR
|
||||||
|
VAR CONSTANT
|
||||||
|
usNrSGMs : USINT := 4; (*Anzahl SGM Maschinen*)
|
||||||
|
END_VAR
|
||||||
|
VAR
|
||||||
|
diTest : DINT;
|
||||||
|
TEST : STRING[255];
|
||||||
|
sVariableName : STRING[255];
|
||||||
|
uiNamespaceIndex : ARRAY[1..usNrSGMs] OF UINT;
|
||||||
|
ConnectionHdl : ARRAY[1..usNrSGMs] OF DWORD;
|
||||||
|
NodeHdl : ARRAY[1..usNrSGMs] OF DWORD;
|
||||||
|
dwUA_NodeGetHandleErrorID : ARRAY[1..usNrSGMs] OF DWORD;
|
||||||
|
UANodeIDs : ARRAY[1..usNrSGMs] OF UANodeID;
|
||||||
|
UANodeAdditionalInfos : ARRAY[1..usNrSGMs] OF UANodeAdditionalInfo;
|
||||||
|
FUBs : typ_FUBs;
|
||||||
|
UASessionConnectInfoSG : ARRAY[1..usNrSGMs] OF UASessionConnectInfo; (*Verbindungsinformationen f<>r alle MashcinenG<6E>ltig*)
|
||||||
|
END_VAR
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<?AutomationStudio Version=4.11.3.51 FileVersion="4.9"?>
|
<?AutomationStudio Version=4.11.4.55 FileVersion="4.9"?>
|
||||||
<Hardware xmlns="http://br-automation.co.at/AS/Hardware">
|
<Hardware xmlns="http://br-automation.co.at/AS/Hardware">
|
||||||
<Module Name="X20BB52" Type="X20BB52" Version="1.2.0.0">
|
<Module Name="X20BB52" Type="X20BB52" Version="1.2.0.0">
|
||||||
<Connector Name="IF6">
|
<Connector Name="IF6">
|
||||||
@@ -22,8 +22,9 @@
|
|||||||
<Connection Connector="SL" TargetModule="X20BB52" TargetConnector="SL1" />
|
<Connection Connector="SL" TargetModule="X20BB52" TargetConnector="SL1" />
|
||||||
<Connector Name="IF2">
|
<Connector Name="IF2">
|
||||||
<Parameter ID="ActivateDevice" Value="1" />
|
<Parameter ID="ActivateDevice" Value="1" />
|
||||||
|
<Parameter ID="HostName" Value="br-sauberraum" />
|
||||||
<Parameter ID="Mode" Value="Manual" />
|
<Parameter ID="Mode" Value="Manual" />
|
||||||
<Parameter ID="InternetAddress" Value="192.168.0.230" />
|
<Parameter ID="InternetAddress" Value="10.30.1.9" />
|
||||||
<Parameter ID="SubnetMask" Value="255.255.255.0" />
|
<Parameter ID="SubnetMask" Value="255.255.255.0" />
|
||||||
<Parameter ID="InaNodeNumber" Value="0" />
|
<Parameter ID="InaNodeNumber" Value="0" />
|
||||||
<Group ID="Vnc1" />
|
<Group ID="Vnc1" />
|
||||||
@@ -64,7 +65,10 @@
|
|||||||
<Parameter ID="ActivateSntp" Value="1" />
|
<Parameter ID="ActivateSntp" Value="1" />
|
||||||
<Parameter ID="SntpcServAddr1" Value="192.168.0.254" />
|
<Parameter ID="SntpcServAddr1" Value="192.168.0.254" />
|
||||||
<Parameter ID="SntpcServAddr2" Value="172.20.1.201" />
|
<Parameter ID="SntpcServAddr2" Value="172.20.1.201" />
|
||||||
<Parameter ID="EthernetDefaultGateway" Value="192.168.0.254" />
|
<Parameter ID="EthernetHostName" Value="br-sauberraum" />
|
||||||
|
<Parameter ID="EthernetDefaultGateway" Value="10.30.1.1" />
|
||||||
|
<Parameter ID="ActivateDns" Value="1" />
|
||||||
|
<Parameter ID="DnsServer1" Value="10.30.1.1" />
|
||||||
<Group ID="FtpUser1" />
|
<Group ID="FtpUser1" />
|
||||||
<Parameter ID="FtpUsername1" Value="read" />
|
<Parameter ID="FtpUsername1" Value="read" />
|
||||||
<Parameter ID="FtpUserPassword1" Value="qfUiHpJCRR54NrgCFBhXrPhLawbJoidwESR1XC4JLBU=" Description="sauberraum22" />
|
<Parameter ID="FtpUserPassword1" Value="qfUiHpJCRR54NrgCFBhXrPhLawbJoidwESR1XC4JLBU=" Description="sauberraum22" />
|
||||||
@@ -76,6 +80,8 @@
|
|||||||
<Parameter ID="FTPAccessRight2" Value="0" />
|
<Parameter ID="FTPAccessRight2" Value="0" />
|
||||||
<Parameter ID="ActivateWebServer" Value="0" />
|
<Parameter ID="ActivateWebServer" Value="0" />
|
||||||
<Parameter ID="ActivateSdm" Value="0" />
|
<Parameter ID="ActivateSdm" Value="0" />
|
||||||
|
<Parameter ID="ActivateOpcUa" Value="1" />
|
||||||
|
<Parameter ID="OpcUaInformationModels_PV_Version" Value="1" />
|
||||||
</Module>
|
</Module>
|
||||||
<Module Name="X20CS1030" Type="X20CS1030" Version="1.8.0.0">
|
<Module Name="X20CS1030" Type="X20CS1030" Version="1.8.0.0">
|
||||||
<Connection Connector="SS1" TargetModule="X20TB12b" TargetConnector="SS" />
|
<Connection Connector="SS1" TargetModule="X20TB12b" TargetConnector="SS" />
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<OpcUaSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" FileVersion="4">
|
||||||
|
</OpcUaSource>
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<?AutomationStudio FileVersion="4.9"?>
|
<?AutomationStudio FileVersion="4.9"?>
|
||||||
<Package SubType="OpcUA" PackageType="OpcUA" xmlns="http://br-automation.co.at/AS/Package">
|
<Package SubType="OpcUA" PackageType="OpcUA" xmlns="http://br-automation.co.at/AS/Package">
|
||||||
<Objects />
|
<Objects>
|
||||||
|
<Object Type="File">OpcUaMap.uad</Object>
|
||||||
|
</Objects>
|
||||||
</Package>
|
</Package>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
<AutomationRuntime Version="B4.92" />
|
<AutomationRuntime Version="B4.92" />
|
||||||
<Build GccVersion="6.3.0" />
|
<Build GccVersion="6.3.0" />
|
||||||
<DefaultTargetMemory Tasks="UserROM" />
|
<DefaultTargetMemory Tasks="UserROM" />
|
||||||
<Transfer SavedOfflineInstallationFolder="" SavedPipDestinationFolder="" SavedRuntimeUtilityCenterPackagePath="" />
|
<Transfer AddToUserPart="False" AdditionalUserDir="" AllowDowngrade="True" AllowInitialTransfer="False" AllowPartitioning="False" ExecuteInitExitProgram="True" ForceInitialTransfer="False" IdentificationTypeValue="" IgnoreVersion="True" KeepNonVolatileMemory="False" PreserveVariableValues="False" ProjectConsistent="True" RebootDuringTransfer="False" SavedOfflineInstallationFolder="" SavedPipDestinationFolder="" SavedRuntimeUtilityCenterPackagePath="" TargetIdentificationType="Always" TryToBootInRunMode="False" UserFilesIgnoreDifference="True" />
|
||||||
<Vc FirmwareVersion="V4.72.7" />
|
<Vc FirmwareVersion="V4.72.7" />
|
||||||
<OnlineConfiguration Name="KD_Reinraum" DeviceType="TCPIP" DeviceParameters="/IF=tcpip /LOPO=11159 /SA=1" ConnectionParameters="/COMT=2500 /RT=1000 /AM=* /SDT=5 /DAIP=192.168.0.230 /REPO=11159 /ANSL=1 /PT=11169" Description="" />
|
<OnlineConfiguration Name="KD_Reinraum" DeviceType="TCPIP" DeviceParameters="/IF=tcpip /LOPO=11159 /SA=1" ConnectionParameters="/COMT=2500 /RT=1000 /AM=* /SDT=5 /DAIP=10.30.1.9 /REPO=11159 /ANSL=1 /PT=11169" Description="" />
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Cpu>
|
</Cpu>
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
<TaskClass Name="Cyclic#3" />
|
<TaskClass Name="Cyclic#3" />
|
||||||
<TaskClass Name="Cyclic#4">
|
<TaskClass Name="Cyclic#4">
|
||||||
<Task Name="PushNot" Source="Machine.PushNot.prg" Memory="UserROM" Language="IEC" Debugging="true" />
|
<Task Name="PushNot" Source="Machine.PushNot.prg" Memory="UserROM" Language="IEC" Debugging="true" />
|
||||||
|
<Task Name="SGM" Source="Machine.SGM.prg" Memory="UserROM" Language="IEC" Debugging="true" />
|
||||||
</TaskClass>
|
</TaskClass>
|
||||||
<TaskClass Name="Cyclic#5" />
|
<TaskClass Name="Cyclic#5" />
|
||||||
<TaskClass Name="Cyclic#6" />
|
<TaskClass Name="Cyclic#6" />
|
||||||
@@ -77,5 +78,6 @@
|
|||||||
<LibraryObject Name="asstring" Source="Libraries.asstring.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
<LibraryObject Name="asstring" Source="Libraries.asstring.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
||||||
<LibraryObject Name="AsBrMath" Source="Libraries.AsBrMath.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
<LibraryObject Name="AsBrMath" Source="Libraries.AsBrMath.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
||||||
<LibraryObject Name="AsHttp" Source="Libraries.AsHttp.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
<LibraryObject Name="AsHttp" Source="Libraries.AsHttp.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
||||||
|
<LibraryObject Name="AsOpcUac" Source="Libraries.AsOpcUac.lby" Memory="UserROM" Language="binary" Debugging="true" />
|
||||||
</Libraries>
|
</Libraries>
|
||||||
</SwConfiguration>
|
</SwConfiguration>
|
||||||
Reference in New Issue
Block a user