LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR: external code called by a Call Library Fonction Node

Hello,

I'm using LABVIEW 8.2 for developing and also installed the Run-Time Engine 8.2 from the NI website on one of the laptops that use our program as a stand-alone application. I receive the following error while trying to measure the frequency of a signal in the stand-alone version:

An exception occurred within the external code called by a Call Library Fonction Node. This might have corrupted LABVIEW's memory. Save any work to a new location and restart LABVIEW. VI "Compteur d'impulsions v1.10.vi" was stopped at node "" at a call to "DAQmx Create AI Channel (sub).vi:2"

The strange thing is that this error is appearing randomly and that sometimes there is no error under the same circumstances after closing and reopening the program. I have the impression that I only have this problem in the stand-alone application and never in the original LABVIEW program.

Any help would be appreciated!

Nicolas




0 Kudos
Message 1 of 10
(3,580 Views)
That's not much to go on. What is your code doing? Can you provide a snapshot?
0 Kudos
Message 2 of 10
(3,575 Views)

Almost sounds like the dll was changed.. 

Are the parameters ok?

0 Kudos
Message 3 of 10
(3,571 Views)
Hello,

I've added a print-screen of the place where I think the error is occurring (Create Channel subvi):

http://home.scarlet.be/~ae209024/ERROR.bmp


I've also added my original program which can be used to find the specific while loop where the error is occuring (use the "find terminal" function of LABVIEW on the interface push button "25 km/h")

http://home.scarlet.be/~ae209024/Nicolas.rar

The error is occurring randomly on the push of the INTERFACE button "25 km/h" (program code below this button: see picture). Please remind that I have the impression that this error is only occurring in the stand-alone application when I push this button. Can the version of the Run-Time Engine have something to do with this? You'll find my project file as well in the RAR file that I used to create my stand-alone application.

Hope this info will help you further.

Best regards,
Nicolas

0 Kudos
Message 4 of 10
(3,558 Views)
You should not be creating the channel each time you loop around. The Create Channel should be outside the loop so it gets created once, and closed once you end the loop.
0 Kudos
Message 5 of 10
(3,553 Views)
Thank you for your advice. I'll try to make these modifications and see if the error is gone. I still find it strange that the error can come from this because the channel is only created when the user pushes the button "25km/u".

Best regards,
Nicolas
0 Kudos
Message 6 of 10
(3,534 Views)
According to the screenshot you posted, the case is driven by an enum, and it looks to be a state machine. There is no button driving that case. Unless the while loop is enclosed within another case? Besides, I do not see a DAQ Close Task within that case, so if you go back to that case (and I have no idea if you do since I don't know what your state machine is doing), you'd be creating an additional task without having closed the one you created previously.

I am not saying this is your problem. I'm simply saying you should not be continuously opening tasks, and you should definitely be closing tasks that you open in the first place. Smiley Wink
0 Kudos
Message 7 of 10
(3,528 Views)
I just changed my program according to your advice and do not see any error anymore after some extensive testing. It is sometimes strange that a badly written program can work 49 times out of 50 but crash badly one time;-) I'm really helpful for your advice! The NI forums always have helped me out of all my programming troubles.

Best regards,
Nicolas
0 Kudos
Message 8 of 10
(3,495 Views)


Nicolas_l2001 wrote:
It is sometimes strange that a badly written program can work 49 times out of 50 but crash badly one time;-)
That's why it is dissficult to teach people proper coding because they claim their programs work and then they tell us not to help them... 😞
Glad you lived the experience and know better 🙂
 
😄
0 Kudos
Message 9 of 10
(3,486 Views)

SPELLING ERROR:  dissficult  = difficult

Today has started as a dissfunctional difficult day 😞

Message 10 of 10
(3,482 Views)