Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

RMCPro V4 freezes (not responding)


ScottB Feb 27, 2012 10:27 PM

Hi,

I am building a real time display using RTMCPro V4 talking to a MySQL database updated via LNDB, the database is on a remote computer.

The display has 14 tabs or screens with a range of complex graphs (e.g. derived salinity from conductivity and temp) as well as some remote images that refresh every 10 minutes (environmental web cams).

In Run-Time the system appears to freeze and Windows 7 puts (Not Responding) in teh task bar, after some time (20 secs or more) it 'un-freezes' and starts working. This is making the system difficult for users to use and it keeps freezing before eventually working. The data only updates every 10 minutes so I could drop the database refresh rates but would like to know what the problem is. This happens even when on a wired network on the same domain as the loggernet/database server.

The display computer is a new Dell Inspiron touch screen computer.

Any ideas or things I can look for??

Thanks,

Scott.


AMK Mar 11, 2012 09:27 PM

Hi,
I just downloaded the trial versions of both LNDB and RTMC Pro and am planning on doing the same thing. Looks like you didn't get a reply to this.

I'm not sure how to configure the ODBC connector to work with a remote database connection. Can you point me to documents that you used to configure this connection?

Thanks,
AMK


ScottB Mar 11, 2012 10:33 PM

Hi,

I managed to fix this myself using a number of ways, for the record this is what I did:

1. Run the RTMCRunTime at the highest Windows priority (real-time) so that it had greater access to the system;

2. Make sure all graphs only had the data they needed, that is set the display cache and display window to the same values.

3. Remove any un-needed Data Sources and to reduce the time interval they refresh on;

4. Turn off animations and set the graphics options to Balanced - I think these had the greatest impact and I didn't even know they were there! (under Edit | Preferences in the runtuime RTMC)


The end result is a systems that responds well and no sign of the old lock up.


Cheers,

Scott.


ScottB Mar 11, 2012 10:49 PM

Hi,

If you just want to use RMTCPro to display non LoggerNet data then you don't need LNDB, you just need LNDB style databases so if this is what you want to achive then do the following:

1. Go to mysql.com and download the community edition of the database including the ODBC connector (presume you are on windows), install the database software and the ODBC connector using the 32 bit version NOT the 64 bit version.

2. Use the following code to create the metadata tables:

------------------------
CREATE TABLE `lndbcolumnmeta` (
`columnID` INT(11) NOT NULL AUTO_INCREMENT,
`LNDBStationMeta_stationID` INT(11) NOT NULL,
`LNDBTableMeta_tableID` INT(11) NOT NULL,
`lnColumnName` TEXT NULL,
`dbColumnName` TEXT NULL,
`process` TEXT NULL,
`units` TEXT NULL,
`dataType` INT(11) NULL DEFAULT NULL,
`columnOrder` BIGINT(20) NULL DEFAULT NULL,
`active` BIT(1) NULL DEFAULT NULL,
PRIMARY KEY (`columnID`),
INDEX `LNDBStationMeta_stationID` (`LNDBStationMeta_stationID`),
INDEX `LNDBTableMeta_tableID` (`LNDBTableMeta_tableID`),
CONSTRAINT `lndbcolumnmeta_ibfk_1` FOREIGN KEY (`LNDBStationMeta_stationID`) REFERENCES `lndbstationmeta` (`stationID`),
CONSTRAINT `lndbcolumnmeta_ibfk_2` FOREIGN KEY (`LNDBTableMeta_tableID`) REFERENCES `lndbtablemeta` (`tableID`)
)
----------------------------------------

------------------------------------------
CREATE TABLE `lndbstationmeta` (
`stationID` INT(11) NOT NULL AUTO_INCREMENT,
`lnStationName` TEXT NULL,
PRIMARY KEY (`stationID`)
)
-------------------------------------

----------------------------------------------
CREATE TABLE `lndbtablemeta` (
`tableID` INT(11) NOT NULL AUTO_INCREMENT,
`LNDBStationMeta_stationID` INT(11) NOT NULL,
`lnTableName` TEXT NULL,
`dbTableName` TEXT NULL,
PRIMARY KEY (`tableID`),
INDEX `LNDBStationMeta_stationID` (`LNDBStationMeta_stationID`),
CONSTRAINT `lndbtablemeta_ibfk_1` FOREIGN KEY (`LNDBStationMeta_stationID`) REFERENCES `lndbstationmeta` (`stationID`)
)
----------------------------------------

3. Now create a data table to store your data in, you need to include the TmStamp and RecNum fields, here is an example for some met data:

------------------------------------------
CREATE TABLE `met_data` (
`TmStamp` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`RecNum` BIGINT(20) NOT NULL DEFAULT '0',
`AirTemp` FLOAT NULL DEFAULT NULL,
`WindDIR` FLOAT NULL DEFAULT NULL,
`AvgWindSP` FLOAT NULL DEFAULT NULL,
`MaxWindSpeed` FLOAT NULL DEFAULT NULL,
`Pressure` FLOAT NULL DEFAULT NULL,
`Rainfall` FLOAT NULL DEFAULT NULL,
PRIMARY KEY (`TmStamp`, `RecNum`)
)
---------------------------------------

4. Now enter values in the lndbstationmeta table such as:

StationId: 1
InStationName: Test_Station

5. Now enter values in the lndbtablemeta table such as:

TableId: 1
LNDBStationMeta_StationID: 1 (this is the value entered above)
InTableName: MetData (this is a name for the data)
dbTableName: met_data (this is teh table name that will hold the data)

6. Now in the lndbcolumnmeta put the column level metadata, for my table this would be:

columnID | LNDBStationMeta_stationID | LNDBTableMeta_tableID | lnColumnName | dbColumnName | process | units | dataType | columnOrder | active
1 | 1 | 1 | TmStamp | TmStamp | TmStamp | NULL | 14 | 1 | NULL
2 | 1 | 1 | RecNum | RecNum | RecNum | NULL | 3 | 2 | NULL
3 | 1 | 1 | AirTemp | AirTemp | Smp | NULL | 9 | 3 | NULL
4 | 1 | 1 | WindDIR | WindDIR | Smp | NULL | 9 | 4 | NULL
5 | 1 | 1 | AvgWindSP | AvgWindSP | Smp | NULL | 9 | 5 | NULL
6 | 1 | 1 | MaxWindSpeed | MaxWindSpeed | Smp | NULL | 9 | 6 | NULL
7 | 1 | 1 | Pressure | Pressure | Smp | NULL | 9 | 7 | NULL
8 | 1 | 1 | Rainfall | Rainfall | Smp | NULL | 9 | 8 | NULL

7. Now just create a program that puts data into the met_data table noting the primary keys and then attach this as a data source to RMTCPro and away you go.

Note: If this isn't what you were trying to do or if you want more helpo just let me know!


Cheers,

Scott.


AMK Mar 12, 2012 12:34 AM

Hi Scott,
Thanks for posting this information - really valuable. But I didn't make it past bullet 1 before my original post. My University won't allow me to run MySQL on a local machine, so I have to connect to a remote host. This is where "Select Database" portion of LNDB seems to be erroring out. I'm going to try it some more, but I may follow up with you if you have experience with setting up a System DSN on Windows 7 32bit because I think this where I may not be configuring something correctly.

Thanks again,
AMK


ScottB Mar 12, 2012 12:48 AM

Hi,

In theory as LNDB uses ODBC if you configure that correctly then you can connect LNDB to a remote database.

So download the ODBC connector from the mysql site, I think you can use teh 64 bit version but not sure. You also need to know the IP address of your remote database along with the port number and of course the database username / password.

If you are not sure about this then search for and download a program called HeidiSQL which allows you to test a connection directly to the database without using ODBC, you will need to know:

- The IP address of the server
- The MySQl port
- The mysql username and password

If connecting this way works then set up the ODBC connection using a SYSTEM not USER conection in ODBC and then tell LNDB to connect via this connection.

So I would:

1. Use HEIDISQL to check that I can talk to the remote database.
2. Download and install the MySQL ODBC connector (try 64 bit first)
3. Set up an ODBC connection and test this.
4. If all Ok link LNDB to this database.

Can give more details if you want, let me know where you got to.

Cheers,


Scott.

Log in or register to post/reply in the forum.