Control system shapes

Started by Paul Herber, August 01, 2017, 08:59:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

metuemre

You can download the visio file and necessary references from the dropbox link below. Tested on Visio Pro 2013 32 Bit and Windows 7 Pro 64 Bit.  List of references are as follows;

https://www.dropbox.com/s/myeexobjw1ofxdi/Download_Package.rar?dl=0

- Microsoft Office Web Components 11.0 ( https://www.microsoft.com/en-US/download/details.aspx?id=22276 )
- Scripting.Dictionary
- TWUtilities40.dll (Used for time control. Source code and more can be found at https://github.com/rlktradewright/tradewright-common)

Visio file is easy to use. Drag and drop shapes from document stencil, connect their connection points via special connector in document stencil or via connector button on Simulation Tab (you can also connect to another connector like in Simulink), change their parameters via shape data window, change simulation duration, sample interval and Start. After it finishes a trend display will automatically show up so that you can see the results. To start another simulation first Reset via button on Simulation Tab then Start again.

Time base for the calculations is 1 second and I couldn't find a way to speed things up. I'm sure someone else can improve it further with more shapes and functions.




metuemre

I think I found a way to speed up the process. Revised Visio file is attached.

I fixed the execution speed to 10 ms. There are three speed modes - Normal (4 Samples per second), Fast (2 Samples per second) and x2 Fast (1 Sample per second).

For a duration of 100 seconds in Normal mode, code will collect 400 samples with 10 ms/sample speed so whole process will take 4 seconds. This will take 2 seconds in Fast mode and 1 second in x2 Fast Mode but resolution will get worse.