Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and Halcon

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.

0 Kudos
Message 31 of 70
(7,703 Views)

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.

0 Kudos
Message 32 of 70
(7,668 Views)

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.

0 Kudos
Message 33 of 70
(7,509 Views)

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.

0 Kudos
Message 34 of 70
(7,493 Views)

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.

0 Kudos
Message 35 of 70
(7,478 Views)

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.

2019-12-14_15-46-35.jpg2019-12-14_15-47-11.jpg

 

0 Kudos
Message 36 of 70
(7,466 Views)

Okay, thank you for your help.

0 Kudos
Message 37 of 70
(7,461 Views)

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?

0 Kudos
Message 38 of 70
(7,459 Views)

It's directly on the block diagram.

2019-12-14_18-38-38.jpg

 

 

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.

0 Kudos
Message 39 of 70
(7,455 Views)

Perhaps I didn't make myself clear. What I mean is that how to put the node on an new blank block diagram.

0 Kudos
Message 40 of 70
(7,422 Views)