06-01-2018 09:46 AM
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.
06-04-2018 03:58 PM
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?
06-04-2018 11:37 PM
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.