a-入门培训视频及14例程vc例程chapter3_ads_e.pptVIP

  • 1
  • 0
  • 约1.23万字
  • 约 67页
  • 2021-04-04 发布于北京
  • 举报

a-入门培训视频及14例程vc例程chapter3_ads_e.ppt

Josef Papenfort TwinCAT The Windows Control and Automation Technology TwinCAT ADS ?Text“ Object Name ConnectVar1 Object Name ConnectVar1 Object Name ConnectVar1 Example VBA II: VB macro handle to connection Example VBA II: Macro Connect Example VBA II: analyse event ADS OCX Example VBA II: Disconnect at run-time stop Example AdsOcx with Exel VBA Data exchange with Connect and filling the list (In preperation) Example VBA III Example 1 Visual Basic: The handle is provided by the PLC and is known to the Visual Basic program. This handle can now be used to demand the variable from the PLC. The Click Event of the command button is selected as the trigger (event) for this action. First therefore read the text field, and assign this value to the variable. AdsOcx1.AdsSyncWriteIntegerVarReq, what is the meaning of this name? As AdsOcx method is used Synchronous writing (Synchronous is related to the processing of the Visual Basic program. Execution of the Visual Basic program only continues when execution of this method has been completed.) A value of type integer This value is to be written via the name variable. Example 1 Visual Basic: The handle is provided by the PLC and is known to the Visual Basic program. This handle can now be used to demand the variable from the PLC. The Click Event of the command button is selected as the trigger (event) for this action. This variable is to be written to the PLC. Example 1 Visual Basic: In the click event of the command button. Pay attention to Intelli Sense from Visual Basic (Studio) Handle which has previously been fetched Length in bytes that will be required for transmission of the variable from the PLC to the Visual Basic application (integer @ 2 bytes) The VISUAL BASIC variable from which the value to be written is to be taken Example 1 Visual Basic: In the click event of the command button. Test: Start PLC, save Visual Basic application and start. If everything is in order, the value in the text window of th

文档评论(0)

1亿VIP精品文档

相关文档