From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a dll with an array as argument in Teststand

Solved!
Go to solution

Hello

 

I have made a dll with the following function call :

 

int __declspec(dllexport) __stdcall FSCOM_ModbusQuery (int nComport, unsigned char ucAddress, unsigned char ucFunctionCode, unsigned char ucTxData[], int nTxDataLength, unsigned char ucRxData[], int nRxDataLength)

 

I want to access this function call in Teststand 2010 SP1. I have made 2 array's in Teststand and gave the adresses to the function call (as you can see in "Capture.png" and "Capture1.png" ).

When i try to run the sequence I get an error on the   ucTxData and ucRxData  with message "Expected number, found array of numbers".

 

How can i solve this problem

 

Thanks in advance

 

Tonnie

 

Download All
0 Kudos
Message 1 of 4
(3,100 Views)

What are you specifying as the data type for the array parameters? You probably do not have them specified as arrays.

 

-Doug

0 Kudos
Message 2 of 4
(3,076 Views)

Hello

 

I have made 2 number array's in teststand. Is it not possible to make 2 unsigned char array's ?

 

Tonnie

 

 

0 Kudos
Message 3 of 4
(3,071 Views)
Solution
Accepted by topic author Tonnie

I think you misunderstood what I meant. In the Module specification tab of the panel you can change the data type that the function expects. You likely have it set to the wrong thing. It should be set to an array of numbers where the elements are 8-bit unsigned integers.

 

-Doug

0 Kudos
Message 4 of 4
(3,054 Views)