Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB program linking to a c code .exe of a differential Equation

Status
Not open for further replies.

saintone1

Technical User
Feb 19, 2002
10
IE
Hi,
I have the follwoing problem. I am creating a c code .exe of the following differential eqaution problem (not yet create)

dh(t) = -c/2gh(t) + 1
----- --------- ------u(t)
dt A(h(t)) A(h(t))

on the first line the / in -c/2gh(t) represents a square root over 2gh(t).

This differential equation represents a surge tank, and the problem is, that i need to have a .exe, to link in to a visual basic program, that will then show results if the flow into the tank changes etc.

The following information is necessary:
where u(t) is the input flow (control input). h(t) is the liquid level (output of plant). A(h(t)) is the cross-sectioanl area of the tank. g = 9.8m/sec squared. c = 1, known cross-sectional area of the output pipe. let r(t) be the desired level of the liquid in the tank ( the reference input)

And I need to figure out how to send an input to the .exe and read an output from it. I have some basic knowledge of VB, but not enough to do this. If anyone could help me with this, I would be extremely gratefull.
Thanks,
Joseph Quinn
 
Hi Joseph,
here's a thread on VB to C linking

thread222-183450
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top