TcXaeMgmt Version 7.X | Send-TcReadWrite [-Timeout ] [-Force] [-Quiet] [-WhatIf] [-Confirm] [ ] SessionIndexed Send-TcReadWrite -IndexGroup [-IndexOffset ] [-WriteValue ] [- WriteLength ] [-ReadLength ] [-ReadType ] -Session [-Encoding ] [- Timeout ] [-Force] [-Quiet] [-WhatIf] [-Confirm] [ ] SessionIdIndexed Send-TcReadWrite -IndexGroup [-IndexOffset ] [-WriteValue ] [- WriteLength ] [-ReadLength ] [-ReadType ] -SessionId [-Encoding ] [- Timeout ] [-Force] [-Quiet] [-WhatIf] [-Confirm] [ ] DESCRIPTION This Cmdlet Read/Writes values from/to TwinCAT Devices and works with different ValueProviders. Because this is a low level data access, only IndexGroup/IndexOffset addressing is available.
IMPORTANT: Sending Read/Write commands should be done with highest care because it could destabilize the TwinCAT System when the write operation is not addressed properly. To enhance secure operation, the user is enforced to use Length parameters in conjunction with the in/out values which will be checked by the Cmdlet. The highest attention should also be taken with the IndexGroup/IndexOffset because that represents the Address in the Process Image and cannot be checked by principle.
To prevent that process image overwrites important data by accident please use the -WhatIf and -Confirm parameters whenever it is appropriate and inform about the $ConfirmPreference settings ( PS> get-help about_Preference_Variables) before usage of the Send-TcReadWrite Cmdlet. EXAMPLES Example 1 PS> Send-TcReadWrite -NetId 1.2.3.4.5.6 -Port 851 -IndexGroup SymbolValueByName -IndexOffset 0 - WriteValue "TwinCAT_SystemInfoVarList._AppInfo.ProjectName" -ReadType string -ReadLength 1024 ReadWrite access of process image on target '1.2.3.4.5.6:851': Start ReadWrite operation WriteData: 'TwinCAT_SystemInfoVarList._AppInfo.ProjectName'(IG:0xf004,IO:0 x0000,Len:47), Read:
Type 'System.String' (Len:'1024) on target '1.2.3.4.5.6:851'? [Y] Yes[A] Yes to All[N] No[L] No to All[S] Suspend[?] Help(default is "Y"): y ADS_DynSymbols Sends a Read/Write request with index group 0xf004 (SymbolValueByName) and offset 0. The write data will be initialized with the project symbol path and an returned (read) string (Default encoded) returned. Example 2 PS> Send-TcReadWrite -NetId 1.2.3.4.5.6 -Port 851 -IndexGroup SymbolValueByName - WriteValue "TwinCAT_SystemInfoVarList._AppInfo.ProjectName" -ReadLength 64 | format-hex ReadWrite access of process image on target '1.2.3.4.5.6:851': Start ReadWrite operation WriteData:
'TwinCAT_SystemInfoVarList._AppInfo.ProjectName'(IG:0xf004,IO:0 x0000,Len:47), Read: Type 'System.Byte[]' (Len:'64) on target '1.2.3.4.5.6:851'? [Y] Yes[A] Yes to All[N] No[L] No to All[S] Suspend[?] Help(default is "Y"): y 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00000000 41 44 53 5F 44 79 6E 53 79 6D 62 6F 6C 73 00 00 ADS_DynSymbols.. 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ TE1000 204 Version: 1.5.0