Using the ActiveX write block

The ActiveX write block links source information in block diagram to another application. The destination application must be an ActiveX container.

To create an ActiveX link to write data to an ActiveX container

1.    Start Embed and open the appropriate diagram.

2.    Click Blocks > Real Time > ActiveX write.

3.    Click the mouse where you want the ActiveX write block to be inserted.

4.    Right-click the ActiveX write block.

5.    Do the following in the ActiveX write dialog box:

      In the Name box, click the DOWN ARROW to select from a list of ActiveX controls, or type in a new one.  

      The Value box is read-only. Indicates a value for the signal. Typically, the value is set dynamically by the application.

      Click OK, or press ENTER.

      Switch to the destination application and open the file in which you want to create a link.

6.    Insert the Embed ActiveX control or OLE object.

7.    Right-click ::IPC var and select IPC Control > Properties.

8.    In the IPC Control Properties dialog box, do the following:

      In the Name box, enter the name of the ActiveX control that corresponds to the ActiveX control name in Embed (see step 6).

      In the Value box, do not type anything. Typically, the value is set dynamically using Microsoft Visual Basic.

      Click OK, or press ENTER.

9.    To manipulate the data:

      Start Microsoft Visual Basic. In many applications, you can start Visual Basic from the application. For example, in Microsoft Excel, click Tools > Macro > Visual Basic Editor.

      Write the appropriate subroutine to manipulate data that is written into the ActiveX container. For information on writing subroutines, see the Microsoft Visual Basic documentation, go to the Object Browser for a list of available functions, and see Embed-specific functions.

10.  Return to Embed and run the simulation.