AnsweredAssumed Answered

Help getting data into VEE: variable (array) from a dll function using .net

Question asked by dgoderich on Aug 13, 2015
Latest reply on Aug 13, 2015 by dgoderich
Hello All,

There is a USB Microchip MCP2210 SPI module that I am trying to talk to from VEE 9.3 using a provided dll from Microchip. I have been in contact with both Microchip and Keysight app engineers and I have not been able to resolve the problem. I am new to the .net environment so I believe it is something subtle that I am missing in the VEE code.

The function has 2 variables dataTx which is data transmitted and dataRx which is data received.
I can send data through the function thats not a problem. The problem is getting data back from the function. I used a logic analyzer and I know the data
is present on the line, I just don't know how to code it in .net VEE to get the array data back from the function.

Does anyone have any examples of reading data using a dll that reads array data back in from a function using .net.

Here is a function definition in the dll:  TxferSpiData.

In this function you have to pass it two array variables:  
METHOD Int32 TxferSpiData(UInt8[ ] dataTx, UInt8[ ] dataRx)

I have upload some sample code.
Any help will be greatly appreciated. 

Damian.  

Outcomes