Can I interface to a MySql database?
Submitted by Joe on Thu, 10/17/2013 - 22:31
For my Master Thesis I will build an Operator for a virtual Plant. So, my problem is to get the readings of several devices. They are stored in a MySql database. The other Problem is to write the used changed Readings to the Database. I am very Thankful if you can Help me build the Blocks, to connect to the different addresses of the Devices.
Friendly Greetings
René
Answers
-
Submitted by Anders89 on Thu, 10/17/2013 - 22:44.
Hi Rene, VisSim lets you create a DLL that contains functions that allow creation of 1 or more blocks in VisSim. The standard VisSim install provides a wizard that creates a VisSim DLL project automatically. It lets you name the block, set input/output pin count and naming, create parameter dialog, and create start up, shut down, and time step functions. This is documented in the VisSim user guide under 'extending the block set'. You can find a C API to Mysql here: http://zetcode.com/db/mysqlc/ here:http://dev.mysql.com/doc/refman/5.0/en/c-api.html and here: http://dev.mysql.com/doc/refman/5.0/en/c-api-function-overview.html
0 -
Submitted by René Bruns on Mon, 11/25/2013 - 17:04.
Thank you Anders it works, but i can not see the Connector Name on the Block ? Do you hav any ideas ?
0 -
Submitted by Anders89 on Mon, 11/25/2013 - 23:37.
You must enable 'View > Connector Labels'. If you still can't see them, attach your event function code or post the section on 'case WM_VSM_CONNECTOR_NAME:'
0 -
Submitted by René Bruns on Tue, 11/26/2013 - 03:55.
Thank you very much
0 -
Submitted by René Bruns on Tue, 11/26/2013 - 04:35.
Hi Anders, Is it possible to run Vissim continuously ?
0 -
Submitted by Anders89 on Fri, 11/29/2013 - 11:02.
Yes. Select System > System Properties... > Auto Restart
0