NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I am using a customer IPC3DLL.dll to wich I can use to send a 1D numeric array to tell the product to move but my data does not seem to go thru. I recieved a success (1) from the queue but the data out is nothing

Below is the fuction call generated to send the data
Locals.Seq_Queue = SendIPC3Message(Parameters.Node_Array_Param, Parameters.Index_Array_Param, Parameters.Move_Array_Param, Parameters.Data_Array_Param)

Locals.Seq_Queue returns a 1 if data is queue susccefully,it does. But the data going out of the serial port is no blanc. Each array is set to -0 for the number of the elements and each value expresion is a single 1D numeric (u8) array. What I am doing wrong. By the way I am ussing Test Stand. Here is copy of the sequence.
0 Kudos
Message 1 of 4
(3,495 Views)
Without knowing what the actual prototype of the function is, there is no way to tell if you are using the dll correctly. You must supply a definition of the function prototype you are concerned with by either supplying a header file for the .dll or copying some contents from it into a post. Other than that there is an example in the \Examples\AccessingArrays\PassingArrayParametersToDLL directory that shows exactly how to pass arrays to .dll functions and you can look at the source for the .dll to examine a function that uses the data once it is passed in.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 4
(3,495 Views)
I have attach a file explaining the IPC3DLL.
I have seen the sample and try it to follow it.
I am checking the output of the data by looping from Com2 to Com1.
0 Kudos
Message 3 of 4
(3,495 Views)
It appears as though none of your calls to SendIPC3Message in the sequence you submitted are adhering to the prototype of the function. Basically, the word document you submitted stated that the prototype looks like this:

WORD SendIPC3Message(const BYTE *p_pBData, WORD p_wLength);

This means that you will need to either pass a string property to the first parameter or an array of 8-bit integers, and a numeric 32-bit value for the second parameter. In your sequence you appear to be either passing only a single parameter or four, and you cannot do this.

If you fill out the Specify Module dialog with the proper parameters, the "Prototype" box will look like one of the following:

long SendIPC3Message(const char *arg1, long arg2);

or


long SendIPC3Message(char arg1[n], long arg2);

In order to pass parameters to dlls you need to have some understanding of procedural languages and pointers, as they are commonly used in C programming. For a better explanation of passing parameters to dlls, assuming you under the aforementioned topics, you can read the section entitled "DLL Flexible Prototype Adapter" of Chapter 13 in the TestStand User Manaul (starts on page 13-5).

TestStand User Manual -> http://digital.ni.com/manuals.nsf/websearch/50B69DA356B8D38C86256A0000660E6B?OpenDocument&node=132100_US

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 4 of 4
(3,495 Views)