LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling dll

I am a beginner in labview.i use euresys as frame grabbers and the driver provided with that is picolo32.dll.While initializing this card I used a function from it named PICOLOSTART( ), while executing it through labview I could somehow get an output as return value.This indicator O/P gives some junk values when the input value is 0 and constantly -3 when i/p is other than zero(0),provided the added parameter follows the input value.if the o/p value is negative its specified in the manual that it is erraneous.Moreover when I tried to call the function DRIVERVERSION( ) the labview discards its operation.please provide some additional details in brief to demarcate these o/p illusions sucessfully.

Advanced thanks.

Shivashanmugam.
0 Kudos
Message 1 of 27
(4,122 Views)
Hi maduri,

Try the attached VI.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 2 of 27
(4,106 Views)
HI SandmanUK,

I thank you very much for your preceded reply and sorry for my belated reply,so we could successfully initialize the card as i used ur attached file and i was able to call the functions Getversion(),getversionex()
but whenever i am trying to run this function for the second time in VI,the output corresponding to hpicolo,sysversion,dll version,board no, gives some junk values.so please brief us, why do this happens when i run it for the second time.
0 Kudos
Message 3 of 27
(4,065 Views)
Hi maduri,

Although I'm not familiar with the card, it is quite possible that the DLL is holding static values within its functions from the first execution.

When a VI uses Call Function Node, the DLL is opened when the VI is opened and is closed when the VI is closed. This means that the instance of the DLL stays resident in memory between VI executions.

You can check to see if this is happening by trying the following steps:

1. open and run VI. Correct values here. (DLL loads and runs)

2. run VI again. I assume this is where you see the junk values. (DLL runs again)

3. close Labview. (DLL closes)

4. open and run VI. Correct values? (DLL loads and runs)

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 4 of 27
(4,060 Views)
hi Sandman,

It does extactly as you said. Can you please tell me, how to get the correct values by avoiding the junk values without quiting the Labview. Is there any specific function to do this ?

Thanks a lot and lot for your kind help.
0 Kudos
Message 5 of 27
(4,052 Views)
Hi madurai,

Please try the attached VI. I've added the PICOLOSTOP() command to see if it will uninitialise the DLL.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 6 of 27
(4,047 Views)
Now, I am getting zero values in all indicators expect hpicolo. Please tell me the idea of adding an
AND operator. Also, check the attached image file which shows statud after excuetion

Thanks.
0 Kudos
Message 7 of 27
(4,041 Views)
Hi madurai,

The AND operator combines the PICOLOSTATUS of the Version node and the Stop node; it combines the error codes of the two.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 8 of 27
(4,038 Views)
Thank you for your reply but still I am getting only zero values in the indicators other than hpicolo. Can you tell me reason behind this?

Thanks.
0 Kudos
Message 9 of 27
(4,025 Views)
Hi madurai,

I'm afraid I can't explain this behaviour as I don't have a Picolo Card to debug this code with.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 10 of 27
(4,017 Views)