beckhoff TX1000 — 4.2 Sample Machine with Microsoft Expression Blend (VB)

Samples WPF Try tcClient.WriteAny(hSwitchWrite, True) Catch MessageBox.Show("Error") End Try End Sub'------------------------------------------------------' wird aufgerufen, wenn das Feld 'lang sam' markiert wird' is activated when the 'slow' field is marked'----------------------------------- ------------------- Private Sub optSpeedSlow_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Ha ndles optSpeedSlow.Click Try tcClient.WriteAny(hSwitchWrite, False) Catch MessageBox.Show("Error") End Try End Sub 8. Deleting notifications and handles: In the Close event of the window the links are enabled again with the method DeleteDeviceNotification() .

//------------------------------------------------------// wird beim Beenden des Programms aufgerufe n// is activated when ending the program//------------------------------------------------------ Private Sub Page1_Unloaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handle s Me.Unloaded Try' Lцschen der Notifications und Handles ' Deleting of the notifications and handles tcClient.DeleteDeviceNotification(hEngine) tcClient.DeleteDeviceNotification(hDeviceUp) tcClient.DeleteDeviceNotification(hDeviceDown) tcClient.DeleteDeviceNotification(hSteps) tcClient.DeleteDeviceNotification(hCount) tcClient.DeleteDeviceNotification(hSwitchNotify) tcClient.DeleteVariableHandle(hSwitchWrite) Catch MessageBox.Show("Error") End Try tcClient.Dispose() End Sub The Machine_Final.pro PLC machine program must run in runtime system 1, and the program can be tested in Internet Explorer 7.

9. Integration in Vista Media Center If you have tested your project sufficiently and found no errors, you can now include it in the Media Center. Call up the project properties again in Visual Studio, but then go to 'Publish'. Click on 'Publish Now'. This creates an xbap file which you subsequently call up in the Media Center. This step is always required whenever the program has been modified and the change is to be transferred to the Media Center. TX1000 42 Version: 1.2