08-20-2019 11:15 AM
Don't know, what's wrong in your case, but I've just checked this on LabVIEW 2019 (64-bit) and HALCON HDevelop 18.11 Steady (64-bit) and everything is working fine. I used my basic sample "LV_Image_To_Halcon_LV2013.vi 20 KB" and changed nothing in the build specs when generating the exe. So, that exe requested these things only:
1) LV RTE 2019 (64-bit);
2) halcondotnet.dll and halcon.dll in data folder near the exe;
3) license.dat near the exe.
That was enough to get it running without errors.
08-31-2019 10:26 AM
I seem to find one more way to grab the array pointer in LabVIEW. It will work only on LV 2017 or higher and is strictly experimental, because relies on untested internal feature (ArrayMemInfo). Therefore you may give it a try, but I still don't recommend its use in any final projects. ArrayMemInfo node eliminates DSNewPtr / DSNewPClr, MoveBlock and DSDisposePtr nodes, but to read back the resulting image, you still have to use MoveBlock or similar function from your OS API.
12-10-2019 08:12 PM
Dear,
When I used the vi of 'Array_Ptr_w_CINs_LV2010_x32', errors occured.
This is the details: I copied the code of the vi to a new vi, then I save the new vi and closed the Labview. When I opened the new vi again, errors occureed in the node of code interface of the 'Get Ptr Of Array' and 'Get Array By Ptr'. Errors are 'subroutine link error' and 'no object code is loaded'.
I ran the vi on LabVIEW 2018 (32-bit) and HALCON HDevelop 12 (32-bit).
Can you tell me the reason?
My english is poor, I hope you can understand my description.
12-11-2019 08:54 AM
Hi, LBD99!
That initial CIN method was superseded by more reliable ways of pointer manipulations. Take a look at LV_Image_To_Halcon_LV2014_fixed.vi 20 KB and try it inside your application.
12-14-2019 02:46 AM
Hi,dadreamer
I have downloaded an ran the vi. Error occurred in the node of the 'LabVIEW:DSDisposePtr' such that 'Error creating instance of IntPtr in assembly System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, (System.OverflowException: Arithmetic operations cause overflow.) <append><b>System.OverflowException</b>'. And there is no picture showed on the HWindowControl.
12-14-2019 04:51 AM - edited 12-14-2019 04:54 AM
You need to switch from 64-bit to 32-bit constructor if you're using 32-bit IDE's. Do a RMB click on this node and choose "Select Constructor", then choose IntPtr(Int32 value) and confirm the change.
12-14-2019 05:51 AM
Okay, thank you for your help.
12-14-2019 06:03 AM
It is very nice of you. In addition, I want to know how to find the node 'LabVIEW:DSDisposePtr'.Can you give me the answer?
12-14-2019 07:48 AM
It's directly on the block diagram.
And here are the doc's for it. But you don't need to alter anything there. You receive the error on this CLFN, because it's the last block on the way of error in/out cluster and no error handler is attached. The real error is happening on Constructor Node, LabVIEW just passes it by wires through all the VI's, which have such error in/out cluster connected.
If you don't want to receive the errors on that CLFN any longer, ignore every error there by attaching Clear Errors VI or by framing DSDisposePtr into Sequence Structure and disconnecting error in/out cluster.
12-16-2019 12:39 AM
Perhaps I didn't make myself clear. What I mean is that how to put the node on an new blank block diagram.