- This topic has 12 replies, 2 voices, and was last updated 1 week, 4 days ago by Charley James.
August 5, 2012 at 1:45 pm #22773
I have a Thorlabs Camera (model DCC1545M) that I would like to control via a c++ program using the TWAIN standard, on a program called micro-manager (cf http://valelab.ucsf.edu/~MM/MMwiki/index.php/TwainCamera).
For this I need to make sure that the Sample Gui App works. If I start TWAIN2 Sample Gui App, no camera is detected. If I start TWAIN2 Sample Gui App32-bit, my camera is detected. However, when I click on connect to data source, the program freezes and I get the error message “Sample TWAIN application has stopped working”.
I tried Twack_32 and it works fine (I can acquire pictures or go on Live mode). If I start Twack_64 and do file->Acquire, I get the following error message:
Return Code: TWRC_FAILURE
Condition Code: TWCC_NODS.
Does anyone know what could prevent me from using the TWAIN2 Sample Gui App, when Twack_32 works?
Thanks a lot,
ChristopheAugust 7, 2012 at 8:06 pm #25671
What is the driver’s TWAIN version?
Is it working when TWACKER is set in TWAIN 2.0 mode?
Do you have 64 bit TWAIN driver for this scanner?August 8, 2012 at 12:00 pm #25672
Thank you very much for your reply.
>What is the driver’s TWAIN version?
I have not been able to find the driver’s TWAIN version unfortunately. The driver’s info can be found here:
if that can help.
Do you know of another way by which I could check the version of the twain driver?
>Is it working when TWACKER is set in TWAIN 2.0 mode?
Yes, in TWAIN_32 Twacker, when I set file>TWAIN2.0 it still works fine.
>Do you have 64 bit TWAIN driver for this scanner?
According to the website indicated above, the drivers should support 64-bit platforms.
thanks a lot,
chrisAugust 8, 2012 at 1:00 pm #25673
To check the TWAIN Protocol – Start TWACKER, File/Message Level/Full, Click “Acquire”. You will see message DG_CONTROL/DAT_IDENTITY/MSG_OPENDS. ProtocolMajor/ProtocolMinor is the TWAIN specification which this driver follows.
To check if there is 64 bit version go to c:windowstwain_64 and look for file or directory with that camera name.August 8, 2012 at 1:47 pm #25674
Thank you very much. Here is what I have
Now, I only have a twain_32 folder and no twain_64 folder, so I guess that the twain driver for that camera does not have a 64bit version. Is that the reason why TWAIN2 sample gui app 32bit freezes? I guess not, since it is supposed to use the 32bit driver.
In fact, my goal is to use TWAIN2 sample gui app32bit to set CAP_UICONTROLLABLE = true.
ChristopheAugust 9, 2012 at 12:49 pm #25675
CAP_UICONTROLLABLE is read only capability. CAP_UICONTROLLABLE =true is mandatory for 1.9 version and after.
Can you clarify these statements :
If I start TWAIN2 Sample Gui App, no camera is detected. If I start TWAIN2 Sample Gui App32-bit, my camera is detected.
What version of TWAINDSM you have on your system?
SysWOW64TWAINDSM.dllAugust 13, 2012 at 9:11 pm #25676
Excellent, thank you.
What I meant is that:
when I start TWAIN2 Sample GUI App, there is no camera that I can select. However,
when I start TWAIN2 Sample GUI App 32bit, then I can select my camera (uc480).
So, I could find the file TWAINDSM.dll, but how do I check its version?
In the meanwhile, I got a reply from Thorlabs:
“The newest TWAIN Standard is 2.1, released July 2009. If you look at the readme.rtf (http://www.thorlabs.com/software/MUC/DCx/Software/Readme.rtf) you can see that the TWAIN Support was added at Sep. 2010. This is the newest Standard and it will support 64-bit platforms.”
Thanks a lot,
ChristopheAugust 15, 2012 at 2:02 pm #25677
TWAIN2 Sample GUI App – means 64 bit version?
TWAIN2 Sample GUI App 32bit – means 32 bit version?
TWAINDSM – check the file version.
Can you check if you have multiple copies of old DataSourceManager (twain_32.dll) in your system? There should be only one in
directory. This can be an issue.August 15, 2012 at 3:39 pm #25678
Thank you very much.
Yes, TWAIN2 Sample GUI App means the 64 bit version and TWAIN2 Sample GUI App 32bit means the 32 bit version. Both of them get installed when you use the installer from sourceforge.net
The file version of TWAINDSM.dll is 18.104.22.168.
I have one copy of twain.dll and one copy of twain_32.dll, which are in the
Does that help?August 17, 2012 at 3:06 am #25679
Thanks for the info.
So there is no 64 bit twain driver that’s why you cannot see it in 64 bit TWAIN2 sample app.
The driver is based on old TWAIN spec. Probably TWAIN Sample app do a call which is not expected by the driver. When it lunches it gets all capabilities Supported/Current/Default values . I will reveiew the code and this week to see what it could be.August 17, 2012 at 1:06 pm #25680
Thank you very much for your help.August 28, 2012 at 1:57 pm #25681
I checked the code and I do not see anything suspicious. It reads CAP_SUPPORTEDCAPS first, then it gets QUERYSUPPORT and then it gets the value with MSG_GET. All these operations should work on all TWAIN versions.
I would get TWAIN Sample App source code from SourceForge and check where it hangs.August 31, 2012 at 3:31 pm #25682
I tried to program something from scratch, using the c++ functions from the API of the camera and it works fine. Nevertheless, thanks for your assistance.