LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

structure handle

here I have initialized an array of size 512^2*n as the pointer needed in pProcessData, it runs without error but I again get the coruppted memory error when I "acquire images". the attached is the vi.
Can a computer learn how to program?
0 Kudos
Message 11 of 21
(1,297 Views)
this is the newest progress, however, it crushes while all functions returns mormally
Can a computer learn how to program?
0 Kudos
Message 12 of 21
(1,287 Views)
I don't know what the various functions in your dll are meant to do so it's hard to comment with any confidence. That being said, I added a couple comments on the block diagram where things looked a bit suspicious. The key one was that the same pointer was being sent as two different input arguments. I'm guessing you might need a separate array allocation and pointer for each.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 13 of 21
(1,274 Views)
thanks for the comments, the first pointer was to located a buffer and it was not used by labview, I suspect that is to be used by the functions in dll; I added another pointer to "gain correction" but the program still crushes after finish running, and it only happenes when the x-ray detector is attached.
Can a computer learn how to program?
0 Kudos
Message 14 of 21
(1,270 Views)
Hello,

After which dll call does the program crash? Does the program not crash if you remove that function? Do any of your dll functions execute correctly (or is there no way to check unless you call all of these functions)?

Watch (probe) the hAcqDesc values coming into each Call Library Function Node (are they still 0?), my suspicion is that Acquisition_GetNextSensor is not initializing HACQDESC properly, but without knowing how this dll works, it is hard to comment. By the way, you should pass Pos and hAcqDesc parameters to this function as Numeric Signed 32-bit Integers by Pointer to Value like you were doing before.

Best regards,
Shakhina P.
NI
Message 15 of 21
(1,254 Views)
Hello,

After which dll call does the program crash? Does the program not crash if you remove that function? Do any of your dll functions execute correctly (or is there no way to check unless you call all of these functions)?

Watch (probe) the hAcqDesc values coming into each Call Library Function Node (are they still 0?), my suspicion is that Acquisition_GetNextSensor is not initializing HACQDESC properly, but without knowing how this dll works, it is hard to comment. By the way, you should pass Pos and hAcqDesc parameters to this function as Numeric Signed 32-bit Integers by Pointer to Value like you were doing before.

Best regards,
Shakhina P.
NI

It crashes after "Aquire Images" now I added another function"creat pixel correction map" it doesn't crash any more but keeps returning error code 7----acquisition descriptor invalid while all other dll nodes are returning 0.
the hAcqDesc vlaues are no longer but doesn't change when it is passed to another funtion.
Thank you very much for the help!
best regards!
kevin
Can a computer learn how to program?
0 Kudos
Message 16 of 21
(1,245 Views)
please ignoral the prvious attachment, I have found the error code problem and the problem is still that the vi crashes after acquirsition image and all returns are normal.
Can a computer learn how to program?
0 Kudos
Message 17 of 21
(1,237 Views)
oh, it doesn't crash if I turn off "highlight execution", it only crashes when it is been turn on. How strange!
Can a computer learn how to program?
0 Kudos
Message 18 of 21
(1,234 Views)
and by the way, since the acquirsition acquire image function made no reference to the buffer "pProcessData", how can I locate the image file and display/save it? I was trying to use local variable but with no success.

thank you!

kevin
Can a computer learn how to program?
0 Kudos
Message 19 of 21
(1,229 Views)
Hi Kevin,

You might want to check with PerkinElmer about how to locate the image file, which function returns it, ...
If you want to see the arrays returned by Acquisition_Acquire_Image, you can create indicators from pwOffsetData, pdwGainData, pdwPixelData outputs and perform any array operations on them, save them to files and so forth. Let me know if I didn't understand the question correctly though.

Thanks and best regards,
Shakhina P.
NI
Message 20 of 21
(1,210 Views)