Author Topic: How to send data from FMD88-10 direct to MSSQL  (Read 12385 times)

Tito

  • Newbie
  • Posts: 48
  • Think
    • View Profile
How to send data from FMD88-10 direct to MSSQL
« on: August 24, 2012, 09:04:56 PM »
Hi , Can i get some information to kick start how to send data from board to local database(MSSQL). Especially how to call connection string to established connection before INSERT data.

Examle connection string :-

<add key="ConnectionString" value="Data Source=(local)\SQLEXPRESS;Initial Catalog=FMD8810;User ID=sa;Password=mysa;" />

Thank you. ???
« Last Edit: August 24, 2012, 09:07:20 PM by Tito »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:How to send data from FMD88-10 direct to MSSQL
« Reply #1 on: August 27, 2012, 10:37:08 AM »
You should create a PHP page to interact with your MYSQL database. You PHP page runs on your webserver which will accept a HTTP GET command from the PLC.

The PLC connects to the webserver using the <TCPCONNECT> method. Once connected, the PLC will use the PRINT #4 command to send the "GET /xxxx.php?[parameters]" where xxxx.php is the file name of your PLC program and [parameters] are a string of key/value pairs that you pass to your PHP program.  The PHP program will then extract the keys and the values from the parameter list and insert them into the MYSQL database records.

If all these are new to you - please hire or consult someone who knows how to write PHP and interact with the MYSQL database as these are beyond the PLC tech support.
« Last Edit: August 27, 2012, 10:38:02 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Tito

  • Newbie
  • Posts: 48
  • Think
    • View Profile
Re:How to send data from FMD88-10 direct to MSSQL
« Reply #2 on: August 27, 2012, 10:57:05 AM »
 :-[ oops.

Before go so far in php, is that possible for me to try out using C#. Using LAN connection between PC and FMD. C# collect the data and pump in MS SQL either local or online.

Please do advice.

Thank you.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:How to send data from FMD88-10 direct to MSSQL
« Reply #3 on: August 27, 2012, 11:00:23 AM »
You can extract data from the PLC using Visual Basic /C#. Please refer to:

http://www.tri-plc.com/appnotes/AppnoteMain.htm

we provide sample codes in Visual Basic to show you how to connect to the PLC and send  Hostlink commands.
« Last Edit: August 27, 2012, 12:26:14 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Tito

  • Newbie
  • Posts: 48
  • Think
    • View Profile
Re:How to send data from FMD88-10 direct to MSSQL
« Reply #4 on: August 27, 2012, 11:48:35 AM »
 ;D Chere's.