DDE communication between tracemode and visual fox pro

S

Thread Starter

Sarma

Respected Sir/Madam,
I am a student interested in scada and automation. I came across Tracemode and acquired the basic version. I wanted to do a project which deals with dynamic communication between tracemode and visual fox pro, so that i can dynamically store the data of the channels every few mintues i specify. But, my problem is that i am unable to initiate the connection between the two. When i am emulating the tracemode and initiating the dde communication with visual fox pro, vfp hangs and as soon as i stop the emulation, vfp displays the error message that it is not running and requires it to run. Please help me solve my problem.
Thanking you,
Sarma.
 
<p>I have no experiences in vfp but I've just finished a project use DDE to connect MSExcel (as well M$Access use ado) with PLC through AB rslinx getway, here is a part of my program and hope it can bring you some ideas.

<p>happy programing!
<pre>
Sub GetBlock()
On Error GoTo errormessage:
Dim SQL As String
Dim BNumber As String
Dim i As Integer
Sheets("dde").Cells(1, 1).Value = "Current Brand"
Sheets("dde").Cells(1, 3).Value = "Current Process"

rsichan = DDEInitiate("rslinx", "plc5/60")
Current_Brand = DDERequest(rsichan, "F26:72")
data = DDERequest(rsichan, "C235:0.ACC")
i = data(1)
data = DDERequest(rsichan, "st85:0")
BNumber = data(1)
DDETerminate (rsichan)

'Sheets("dde").Cells(1, 2).Value = Current_Brand(1)
'Sheets("dde").Cells(1, 4).Value = i

'Select Case Current_Brand(1)
Select Case Sheets("dde").Cells(1, 2).Value
Case 1
SQL = "select * from DaVinciGel where process=" & i
Call ProcessQuery(SQL, 1, i, BNumber, "DaVinciGel")
..................
End Select
Exit Sub

errormessage:
MsgBox "!!!!!!!!!!!!!"

End Sub
</pre>
 
Top