LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with CAN card and exiting LabView

Hi,

 

I have a problem with using my CAN card (EDICCard2 from Softing).

I have written a program that communicates via the CAN bus.

For the card there exists a windows API and I am calling the dll-functions with the "Call Library"-function.

The communication (receiving and transmitting) is working fine.

But if I stop the VI and start it again, the CAN is not working any more.

I have to close the VI and re-open it to reactivate the CAN-card.

From softing there exists an example for using the dll with LabView6 I have used and modified this example.

The last operation bevore the VI stops is calling the function "INIPC_close_board" from the dll.

I thougth after that the CAN card will be released but it seems as if the card is already in use.

After restarting the VI (without closing) the function "INIPC_initialize_bord" also gives back a failure.

 

Has anyone an idea why the board is only released after closing th VI?

 

Best regards

 

Sven

0 Kudos
Message 1 of 2
(1,740 Views)

 Hi Sven,

 

it looks like the CAN resource is not released in your program.

 

Maybe inserting a wait of a couple of ms after calling the "INIPC_close_board" will do the trick. Otherwise please contact the Softing support why the resource is not released when calling "INIPC_close_board".

 

Regards,

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 2 of 2
(1,714 Views)