LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Create fp with array of integer parameter such that each parameter have default value which can be modifed.

I would like to create a dll with fp information. How do I proceed it with array of interger parameter, I need to pass/modify this integer parameter in the dll. What about parameter dealing with structure? How can I do it on the function panel. In function panel there is an parameter type int[], but how can I determine the array size? And how can I modify the int parameter in the array?
0 Kudos
Message 1 of 4
(3,201 Views)
Hi,

When you are handling arrays in the function panels the most common way of doing it is to create a control with the datatype int[],this will actually pass a pointer to the array that you can use in the dll. It is common to have another input control that defines the number of elements in the input array, most CVI functions that handle arrays do it that way. As for the default values, you can't define those in the function panel since you only pass the pointer to the array. what you can do is define those default values in the dll.

To pass structures through the function panel there is a good posting that I found around here:
custom type in Function Panels

I hope this helps.
let me know if you have questions.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 4
(3,201 Views)
Hi Juan,

Thank you for your reply. I was trying something out yesterday, I realised that in the function panel,not all data type are available for the control. As I was running the dll from the function panel,(intractive window), I encountered this problem, "found integer expected pointer to integer" for my slide control. I declared my slide control as int[],and I also defined two value pair for it. Of course it made sense for the error message, but under what condition do you used a slide control with a data type int[]?

Thank you!
Best REgards

applelow
0 Kudos
Message 3 of 4
(3,201 Views)
Applelow,

I don't see many situations where you would use a slide control with a int[] data type. There is the possibility to have a slide if you want to give the user the chance to pass null or a fixed value. But there is hardly any situation like that, since the value passed when using int[] is the actuall memory address.

Good Luck!
Regards,

Juan Carlos
N.I.
0 Kudos
Message 4 of 4
(3,201 Views)