beckhoff TE1000 — 5.10.4 Accessing Symbolic Information

How To | TwinCAT / Device Diagnosis Getting TwinCAT License information PS> $session = New-TcSession -Route TC3TESTA1-CP67X -Port 30 PS> Get-TcLicense -Status All -name *scope* -session $session Name Valid ValidityCode ExpireTime Available Used VolumeNo ---- ----- ------------ ---------- --------- ---- -------- TC3 Scope Server X Valid CPU License 0 0 TC3 Scope View Professional X Valid CPU License 0 0 Create a session to the License Server on target 'TC3TESTA1-CP67X' and return all valid and invalid licenses that contain 'scope' in their name.

Getting actual TwinCAT Router information of a target system PS> Get-TcRouterInfo Target Result TotalMem(kb) AvailMem(kb) Ports Drivers Transports Mailbox Size(kb) Mailbox Queue ------ ------ ------------- ------------- ----- ------- ---------- ----------------- ------------- CX_1234 Ok 32768 32759 31 4 11 0 0 Get router information from the local system.

5.10.4 Accessing Symbolic Information | Accessing Symbolic Information Getting Root Symbols PS> Get-TcSymbol -port 851 InstanceName DataType Size InstancePath ------------ -------- ---- ------------ tc2vBool BOOL 1 .tc2vBool tc2vInt INT 2 .tc2vInt Constants 0 Constants 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):

Browsing through Symbols recursively and filter with wildcards 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*'.

Browsing DataTypes PS> Get-TcDataType -port 851 Name Size Category BaseType ---- ---- -------- -------- BYTE 1 Primitive WORD 2 Primitive DINT 4 Primitive UDINT 4 Primitive DWORD 4 Primitive E_ByteEnum 1 Enum BYTE FB_Test 12424 Struct PLC.PlcAppSystemInfo 256 Struct PLC.PlcTaskSystemInfo 128 Struct POINTER TO BYTE 4 Pointer BYTE R_Range 2 Alias INT (-6..12) REFERENCE TO BOOL 4 Reference BOOL ST_SimpleStruct 166 Struct TE1000 30 Version: 1.5.0