Using the ActiveX read block

The ActiveX read block links source information in an application file to a block diagram. The source application must be an ActiveX container.

To create an ActiveX link to read data into Embed

Follow this general procedure when you want to read data into Embed. Because each application may handle ActiveX controls differently, see that application’s documentation for specific instructions.

After you have established your link between the application and Embed, run the simulation to begin transmitting data.

1.    In the application, insert the Embed ActiveX control or OLE object.

The following element appears in the work area:

2.    To manipulate the data:

a.    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.

b.    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.  

c.     Return to the application and invoke the Embed ActiveX control properties dialog. For most applications, right-click ::IPC var and select IPC Control Object; then click Properties.

3.    In the IPC Control Properties dialog, do the following:

a.    In Name, enter the name of the ActiveX control.

b.    In Value, enter a value for the control. Typically, the value is set dynamically using Microsoft Visual Basic.

c.     Click OK, or press ENTER.

4.    Start Embed and open the appropriate diagram.

5.    Click Blocks > Real Time > ActiveX read.

6.    Click where you want the ActiveX read block to be inserted.

7.    Right-click the ActiveX read block.

8.    In Name, click the DOWN ARROW and select the name of the ActiveX control that you specified in the corresponding IPC Control Properties dialog (step 3).

9.    Click OK, or press ENTER.

10.  Run the simulation.