beckhoff TE1000 — 6.40 Get-TcSymbol

TcXaeMgmt Version 7.X | Get-TcSymbol GVL 0 GVL MAIN 0 MAIN Slow 0 Slow TwinCAT_SystemInfoVarList 0 TwinCAT_SystemInfoVarList Get the root symbolic information from the local system (Port 851):

Example 2 PS>$session = New-TcSession -NetId 1.2.3.4.5.6 -Port 851 PS>$session | Get-TcSymbol "TwinCAT_SystemInfoVarList._AppInfo" -recurse InstanceName DataType Size InstancePath ------------ -------- ---- ------------ _AppInfo PLC.PlcAppSystemInfo 256 TwinCAT_SystemInfoVarList._AppInfo ObjId OTCID 4 TwinCAT_SystemInfoVarList._AppInfo.ObjId TaskCnt UDINT 4 TwinCAT_SystemInfoVarList._AppInfo.TaskCnt OnlineChangeCnt UDINT 4 TwinCAT_SystemInfoVarList._AppInfo.OnlineChangeCnt Flags DWORD 4 TwinCAT_SystemInfoVarList._AppInfo.Flags AdsPort UINT 2 TwinCAT_SystemInfoVarList._AppInfo.AdsPort BootDataLoaded BOOL 1 TwinCAT_SystemInfoVarList._AppInfo.BootDataLoaded OldBootData BOOL 1 TwinCAT_SystemInfoVarList._AppInfo.OldBootData AppTimestamp DT 4 TwinCAT_SystemInfoVarList._AppInfo.AppTimestamp KeepOutputsOnBP BOOL 1 TwinCAT_SystemInfoVarList._AppInfo.KeepOutputsOnBP ShutdownInProgress BOOL 1 TwinCAT_SystemInfoVarList._AppInfo.ShutdownInProgress LicensesPending BOOL 1 TwinCAT_SystemInfoVarList._AppInfo.LicensesPending BSODOccured BOOL 1 TwinCAT_SystemInfoVarList._AppInfo.BSODOccured TComSrvPtr ITComObjectServer 4 TwinCAT_SystemInfoVarList._AppInfo.TComSrvPtr AppName STRING(63) 64 TwinCAT_SystemInfoVarList._AppInfo.AppName ProjectName STRING(63) 64 TwinCAT_SystemInfoVarList._AppInfo.ProjectName Create a session to the target system '1.2.3.4.5.6' Port:

851 and get the symbol 'TwinCAT_SystemInfoVarList._AppInfo' and its subsymbols recursively. Example 3 PS> $session = New-TcSession -Name 'CX_123456' -port 851 PS> $session | Get-TcSymbol -recurse | where InstanceName -like 'Project*' InstanceName DataType Size InstancePath ------------ -------- ---- ------------ ProjectName STRING(63) 64 TwinCAT_SystemInfoVarList._AppInfo.ProjectName Gets an ADS-Session/Connection to the target system CX_123456 on port 851, downloads the symbol information recursively and returns all Instances where the instance name is like the pattern 'Project*'.

Example 4 PS> $s = New-TcSession -port 851 PS> $s | Get-TcSymbol -path '.tc2vStructArray`[0`]','.tc2vStructArray`[1`]' InstancePath Category DataType Size Static Persistant IG IO ------------ -------- -------- ---- ------ ---------- ---- ------ .tc2vStructArray[0] Struct ST_SimpleStruct 165 False False 4040 117942 .tc2vStructArray[1] Struct ST_SimpleStruct 165 False False 4040 1179E7 Gets an ADS-Session/connection to the local system PLC (Port 851) and get two Array Elements. Because the -path parameter uses the wildcard paramater '[' and ']' these characters must be escaped with backtick '`'.

Example 5 PS> $s = New-TcSession -port 851 PS> $s | Get-TcSymbol -literalPath '.tc2vStructArray[0]','.tc2vStructArray[1]' InstancePath Category DataType Size Static Persistant IG IO ------------ -------- -------- ---- ------ ---------- ---- ------ .tc2vStructArray[0] Struct ST_SimpleStruct 165 False False 4040 117942 .tc2vStructArray[1] Struct ST_SimpleStruct 165 False False 4040 1179E7 TE1000 166 Version: 1.5.0