LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the CallInstrument function?

Hello!,
Related to the message "How To Use Exported Function CallInstrument of LabView.exe? <http://forums.ni.com/ni/board/message?board.id=170&message.id=118159>", can anybody show me a minimal C source example of how to generate the correct definition of the control/indicators parameters?. In other words, I need the definition of the typedef array for the datatype and the pointer to the unflat data of the controls/indicators to be passed to the CallInstrument function.
 
At the moment, I have just only used this función without any controls/indicadors parameters.
 
MgErr __cdecl CallInstrument( Path path, Bool32 modal, int32 nInputs, int32 nOutputs, ... );
...
MgErr MyCallInstrument( char szPath[] ) {
     Path path = NULL;
 MgErr err;
 //
 FTextToPath( szPath, strlen(szPath), &path );
 return CallInstrument( path, TRUE, 0, 0 );
}

System: WinXP, LV7.1.1
 
Thanks !!!
 
Jesus Valero
Plataforma Solar de Almeria <http://www.psa.es>.
 
0 Kudos
Message 1 of 3
(3,186 Views)
Hi Jesus

  CallInstrument function is internal to LabVIEW and thus we don't support it. What are you trying to accomplish? we might find another way to do it

Best Regards
Javier Gutiérrez
NI Application Engineering
0 Kudos
Message 2 of 3
(3,137 Views)
Hola Javier,
Lo primero darte las gracias por contestar y lo segundo disculparme por no haberte contestado antes, pero en honor a la verdad acabo de ser padre del hijo más guapo de todo el mundo, por lo que no he podido hacerlo hasta hoy.
 
Pues bien, mi intención es crear un control ActiveX que pueda ser integrado en el panel frontal de un archivo VI para que pueda interactuar directamente con este mismo VI. También me gustaría que indirectamente pudiera ejecutar otros Sub-VI's, estableciento los valores de sus controles y leyendo sus indicadores.
 
En realidad ya expuse esto mismo en el foro
 
Pero me encontré con el problema que allí detallo, y como nadie me contestó tuve que investigar por mi cuenta llegando como último paso a la función interna CallInstrument. Y aqui estamos.
 
Muchas gracias de antemano.
 
 
 
0 Kudos
Message 3 of 3
(3,120 Views)