Page 809 - ExtendSim User Guide
P. 809

Data Source Type Internal Databases
External Databases
Arrays Text Files
Data Management and Exchange 783
Communicating with external devices
Indexing How organized
1-based Column/Row (Field/Record)
1-based Column/Row (Field/Record)
0-based Row/Column N/A Row/Column
Communicating with external devices
In some situations, you may want to obtain data for a model directly from an external piece of equipment. For instance, when modeling a chemical process you might want to read the tem- perature of the actual process and compare it to simulated results.
If you create your own blocks with ModL code, there are two methods you can use to commu- nicate with external devices such as scientific equipment and other hardware:
• DynamicLinkLibraries(DLLs)onWindowsorSharedLibrariesforMacOS.DLLsand Shared Libraries are segments of code written in a language other than ExtendSim's ModL, such as Visual Basic or C++. Their standardized interface provides a method for linking between other languages and ModL. They can also be used to perform complex calculations utilizing specialized hardware. For more information, see “DLLs and Shared Libraries” on page 789 and the Developer Reference.
• SerialportfunctionsonWindows.Topassdatathroughserialdevices,usetheserialport functions. These functions can read and write any data (including real-time data) to and from the computer’s serial ports. This is useful for transmitting and receiving data on a modem, for example. For more information, see the Developer Reference.
Technologies for communication
Many technologies have been developed as industry standards to allow applications to share and access data both internally and with each other independent of programming language, operating system, and file type. ExtendSim supports most of the standard types of communica- tion technologies including:
ExtendSim Use or Implementation
Import and export of raw data or ExtendSim databases, Report and Trace files.
Import from, or export to, ADO compliant databases using a “Data Import Export” block (Value library).
Embedding controls and objects. The Gantt Chart (Plotter library) has an embedded ActiveX control.
DDE Link menu commands.
Text Files ADO
How To

   807   808   809   810   811