Would someone out there be kind enough to lend some help translating some VB funtions to PB. I'm brand new to PB and am having a little difficulty with some functions to comunicate with a line scan camera.
When I run my attached LC1Cam.bas fle I get a Windows message "cannot find entry point" in the "LC1_DRV_32.DLL". I believe this is caused from not recieving the serial number correctly.
The camera runs with a supplied C++ program (I do have the source codeif needed) and also runs fine with a program I wrote in Liberty Basic. I have been fighting this problem all week (since I purchase PB) so if someone could take some time to help me, I would be very appreciative.
The only functions I need are as follows:
1) Declare Function LC1_init& Lib "LC1_Drv_32.dll" ( ByVal x1$, ByVal x2&, x3&)
This sends a ID string Serial Number to the camera as x1$, a timeout variable x2# between 1000 to 6000 ms, and retrives a unique insrument handle for the session. This handle is used in all other funtions.
ID string$ = "USB0::0x1313::0x0110::S/N M00226832::RAW"
2) Declare Function LC1_close& Lib "LC1_Drv_32.dll" ( ByVal x1&)
Sends the instrument handle above and closes out camera.
3) Declare Function LC1_setIntTime& Lib "LC1_Drv_32.dll" ( ByVal x1&, ByVal x2#)
This sends instrument handle , and then the exposure time between 0.001 to 0.200 seconds.
3) Declare Function LC1_getIntTime& Lib "LC1_Drv_32.dll" ( ByVal x1&, x2#)
This sends instrument handle , and gets the exposure time back from the camera as 0.001 to 0.2 seconds
4) Declare Function LC1_startScan& Lib "LC1_Drv_32.dll" ( ByVal x1&)
This sends instrument handle and when recieved starts a camera line scan
5) Declare Function LC1_getScanData& Lib "LC1_Drv_32.dll" ( ByVal x1&, x2#)
This sends instrument handle, then (I'm not sure how but) I believe sends back the address of an array with (3000) pixels of data.
The LC1Cam.bas file is my feeble attemp.
The next 2 are manufacture supplied VB information files
Finally, the .zip file contain the .dll and a win32 type .hlp file which gives a detailed description of each command.
Thanks so much in advance,
Mike
When I run my attached LC1Cam.bas fle I get a Windows message "cannot find entry point" in the "LC1_DRV_32.DLL". I believe this is caused from not recieving the serial number correctly.
The camera runs with a supplied C++ program (I do have the source codeif needed) and also runs fine with a program I wrote in Liberty Basic. I have been fighting this problem all week (since I purchase PB) so if someone could take some time to help me, I would be very appreciative.
The only functions I need are as follows:
1) Declare Function LC1_init& Lib "LC1_Drv_32.dll" ( ByVal x1$, ByVal x2&, x3&)
This sends a ID string Serial Number to the camera as x1$, a timeout variable x2# between 1000 to 6000 ms, and retrives a unique insrument handle for the session. This handle is used in all other funtions.
ID string$ = "USB0::0x1313::0x0110::S/N M00226832::RAW"
2) Declare Function LC1_close& Lib "LC1_Drv_32.dll" ( ByVal x1&)
Sends the instrument handle above and closes out camera.
3) Declare Function LC1_setIntTime& Lib "LC1_Drv_32.dll" ( ByVal x1&, ByVal x2#)
This sends instrument handle , and then the exposure time between 0.001 to 0.200 seconds.
3) Declare Function LC1_getIntTime& Lib "LC1_Drv_32.dll" ( ByVal x1&, x2#)
This sends instrument handle , and gets the exposure time back from the camera as 0.001 to 0.2 seconds
4) Declare Function LC1_startScan& Lib "LC1_Drv_32.dll" ( ByVal x1&)
This sends instrument handle and when recieved starts a camera line scan
5) Declare Function LC1_getScanData& Lib "LC1_Drv_32.dll" ( ByVal x1&, x2#)
This sends instrument handle, then (I'm not sure how but) I believe sends back the address of an array with (3000) pixels of data.
The LC1Cam.bas file is my feeble attemp.
The next 2 are manufacture supplied VB information files
Finally, the .zip file contain the .dll and a win32 type .hlp file which gives a detailed description of each command.
Thanks so much in advance,
Mike
Comment