LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatic shutdown

I am reading from the serial port and displaying it to the string indicator.
0 Kudos
Message 11 of 20
(1,170 Views)
really there is no need for a dll to do just this solve all your problems by just using the read from serial port vi.

Message Edited by jhoskins on 08-29-2005 02:05 PM




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 12 of 20
(1,167 Views)
I want to read from the serial but I want to get a better understanding from calling external functions. Besides I am not allowed to do that.
0 Kudos
Message 13 of 20
(1,165 Views)
Now we know. See we always try to give easy answers and we are 99% of the time going to tell you the LV way and to stay away from dlls as much as possible. Please post some code and the dll if you can and we will try and help you.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 14 of 20
(1,159 Views)

So this is a class exercise, the goal of which is to learn about calling DLLs--right?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 20
(1,151 Views)
Its not for class. I am trying to get a better understanding of the features of labview. I have been using labview for almost three months and I really don't have any type of manuals to use. I mostly learn everything from the forums, but there aren't that many on dlls.
0 Kudos
Message 16 of 20
(1,145 Views)
You should not be closing a Labview program while a DLL which it calls is still running.  Wait until the DLL is done, then close Labview.  Otherwise you will have problems.  I am assuming that when LV calls a DLL, it pushes some values onto a stack, and when the DLL is done, the values are popped from the stack so that LV can continue where it was when it called the DLL.  When closing LV before the DLL is done, those values on the stack are abandonned, and the next process to pop from the stack will get wrong values.  The stack contains such info as where is the address of the next instruction to be run.  Things get really screwed up, and could result in an entire system crash.  Fortunately in this case the OS is able to recognize the LV error and is able to clean things up, so only LV is shutdown.  Consider getting rid of the DLL and doing the functions in Labview.  Make a subvi, and you can call it from other LV programs.  I stay away from DLLs as much as I can.  Of course you have to use them in cases like instrument drivers and such.  But if I can write LV code to do the same, I will do so and eliminate the DLL.
- tbob

Inventor of the WORM Global
0 Kudos
Message 17 of 20
(1,138 Views)
Thanks I will try that.
0 Kudos
Message 18 of 20
(1,132 Views)

Why are you not allowed to use the built-in serial drivers?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 19 of 20
(1,127 Views)
I already know how to use the VISA function, but I am more interested in using .dll
0 Kudos
Message 20 of 20
(1,120 Views)