First of all, thankyou for any assistance that can be offered.
I am using Visual Foxpro (7 & 9) to write a program to acquire data. Now the old version of the software used Visual Basic as an intermediary to get past this issue with Foxpro and the variant data type array used by the CWAI (or the other controls for that matter).
I need to eliminate the VB portion of the software and move completely to Visual Foxpro, has anyone done any development using Foxpro, rather than VB.
For example, the following code (from a sample) generates the following error "OLE error code 0x80020005: Type mismatch"
Converted from VB
*Call acquire once, and set the XAxis minimum to
*the current time and the maximum to 10 seconds ahead.
THISFORM.cwai1.DEVICE = "1"
THISFORM.cwai1.channels(1).channelstring = "1"
THISFORM.cwai1.configure
DIMENSION laDATA(1,1) AS variant
DIMENSION labin(1,1) AS variant
STORE 0 TO ladata,labin
lo = thisform.cwai1
*Call acquire once
lo.acquiredata(@laDATA,@labin)
LOCAL START AS variant
START = DATETIME()
*Set the XAxis minimum to the current time and the maximum
*to 10 seconds ahead.
THISFORM.cwgraph1.axes(1).setminmax(START, START + lnsec * 10)
*Plot the first set of data.
THISFORM.cwgraph1.ploty(@laDATA, DATETIME(), lnsec * THISFORM.cwai1.scanclock.actualperiod)
*Begin a continuous acquisition.
THISFORM.cwai1.START