Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QBasicProgram simulates a PID controller
#1
Hey Qbasicer!!

I'm new in this forum......so please be sensitive with me Smile
ok, I'm doing an internship and I have to simulate a closed controll loop for some controlled systems. My colleague has already written a code in Qbasic (good old programming!) for the controller....but my boss wants to simulate it in matlab-simulink....so is there a possibility to run the qbasic code in matlab or is there any qbasic emulator....or mybe I can run it in C++(but I hate C++)!! How easy or difficult would it be to transform the Qbasic code into a matlab m-file?

It would be great when anybody could give me a hint or a solution...


cheers

Marcus[/code]
=mc^2 - steindi_constante
Reply
#2
Quote:Hey Qbasicer!!

I'm new in this forum......so please be sensitive with me Smile
ok, I'm doing an internship and I have to simulate a closed controll loop for some controlled systems. My colleague has already written a code in Qbasic (good old programming!) for the controller....but my boss wants to simulate it in matlab-simulink....so is there a possibility to run the qbasic code in matlab or is there any qbasic emulator....or mybe I can run it in C++(but I hate C++)!! How easy or difficult would it be to transform the Qbasic code into a matlab m-file?

It would be great when anybody could give me a hint or a solution...


cheers

Marcus[/code]

Hi Marcus,

I don't think matlab can run QB code directly. However, I do believe the formulas, logic branching and such can be reproduced. If you save your QB source as text (should be an option when you save that file from the QB IDE) you should be able to copy the parts you need into matlab and make minor adjustments in matlab for them to work so all the work is not totally wasted.

Any user interface code might not work as Matlab doesn't seem to support this per se so that part will have to be redone in matlab itself in whichever way best suits the needs of the simulation.

Like I said, the minding behind the QB program should work however. you just need to reproduce that mind set into matlab's own system.

Hope this helps,
hen they say it can't be done, THAT's when they call me ;-).

[Image: kaffee.gif]
[Image: mystikshadows.png]

need hosting: http://www.jc-hosting.net
All about ASCII: http://www.ascii-world.com
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)