LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Cognex DM70 Barcode scanning into cvi

I am trying to scan in a 2D barcode into CVI 2015. I can trigger the scanner (Cognex DM70) via my code but the return result is an integer instead of a string and is not even close to what I expect ( a string). I can also manually scan the 2D barcode via the DataMan 5.7.0 setup tool and get expect results in that program.

 

Attached is the code I am using.

 

 

 

0 Kudos
Message 1 of 3
(2,302 Views)

Hi Dennis,

 

Is this an example program that you got from Cognex? Have you tried scanning different barcodes and do you always get an integer? 

Adena L.
Technical Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,260 Views)

Where do you expect the result ?

The last two lines of your code are


sprintf(Cust_num1,  "%d",name);    

 status = Cognex_DataMan_SDK_DataManSystem_SendCommand (DM_system, "GET RESULT", &name, NULL);


That looks for me , that a SDK call is missing, which actually reads the result and puts it into a variable. 

0 Kudos
Message 3 of 3
(2,255 Views)