Some notes about our tests of the 3.7 series which foundered on a problem talking to the Sutter MP285 controller.
From: Vijay Iyer <iyerv@janelia.hhmi.org> Subject: RE: ScanImage 3.7.1 beta Date: 6 September 2011 12:38:47 GMT+01:00 To: Dr Gregory Jefferis <jefferis@mrc-lmb.cam.ac.uk> Hi Greg, That is very disappointing to hear. There was a bug prior to 3558 that was leading to unreasonably frequent motor communication failures...that's been fixed in r3558. At the moment , r3.7/r3558 has been working reliably with the MP-285 in our hands. I remember seeing a startup connection issue like the one you describe, but this was before the bugfix and with someone who was using 2009b, which was fixed by going to 2010b. As far as we know, that bug was the main source of MP-285 failures. We are working on further improving the motor interface with the aim of making it even more reliable in our hands, as part of 3.8, i.e. to squeeze out rarer events leading to failure. But certainly we're not seeing issues to level you describe with r3.7. I'm not sure how much I can help further without really being at your machine to try and see if there's some timing difference, etc. leading to the problem. The best I can do I think is send on 3.8 when we've finished the motor changes there. (In general, I was only going to suggest 3.8 to new users or users interested in Cycle mode.) Best regards Vijay From: Dr Gregory Jefferis [jefferis@mrc-lmb.cam.ac.uk] Sent: Tuesday, September 06, 2011 6:33 AM To: Iyer, Vijay Cc: Aaron Ostrovsky Subject: Re: ScanImage 3.7.1 beta Hi Vijay, This is the description of an MP-285 controller problem that we were having with 3.7 both release and even worse r3558. We are using 2010b SP1 with 3.7 series and 2008b with 3.6. We're using an MP285 controller as delivered to us by Sutter with a MOM unit in April 2010. with the release 3.7 scanimage would establish communication but then frequently have dropped connections. With this r3558 version scanimage is failing to establish communication at all. We can talk to the MP285 with scanimage 3.6 or a terminal session, so I suspect a code change. We are using defaults only for the controller apart from specifying in the ini file that it is an mp285. Does this ring a bell? We see no improvement in this behaviour between r3558 and 3.7.1 beta. Did you chaps think that you had found a fix or is this one outstanding? Many thanks, Greg.
Aaron testing this with Matlab 2010b SP1
After moving C:\Program Files\ScanImage\SCANIMAGE_r3.8RC1.new\+dabs\+ni\+daqmx\private\NIDAQmx_8_8\NIDAQmx.h to the private folder, fixed one error message bust still get. DLL C:\windows\system32\nicaiu.dll does not seem to be present.
*** CURRENT INI FILE = C:\Users\superFlyGuy\Documents\MATLAB\ScanImage\ScanImage3.8rc1\standard.ini ***
NI DAQmx: Detecting API version...Done! (8.8)
NI DAQmx: Loading DLL...
??? Error using ==> loadlibrary at 477
There was an error loading the library "C:\windows\system32\nicaiu.dll"
Undefined function or variable 'NIDAQmx_proto'.
Error in ==> APIWrapper>APIWrapper.smartLoadLibrary at 952
loadlibrary(fullfile(DLLPath,obj.apiDLLName),str2func(headerFile));
Error in ==> DAQmxClass>DAQmxClass.smartLoadLibrary at 469
smartLoadLibrary@most.APIWrapper(obj);
Error in ==> APIWrapper>APIWrapper.APIWrapper at 184
obj.smartLoadLibrary();
Error in ==> DAQmxClass>DAQmxClass.DAQmxClass at 1
classdef DAQmxClass < most.APIWrapper & most.PDEPPropDynamic
Error in ==> System>System.System at 28
function obj = System(varargin)
Error in ==> setupDAQDevices_Common at 40
state.init.hDAQmx = System();
Error in ==> scanimage at 222
setupDAQDevices_Common; % config independent
Error in ==> run at 57
evalin('caller', [s ';']);
Caused by:
Error using ==> feval
Undefined function or variable 'NIDAQmx_proto'.
This time we get an error related to MP285 controller
*** CURRENT INI FILE = C:\Users\superFlyGuy\Documents\MATLAB\ScanImage\ScanImage3.8rc1\standard.ini ***
***** Motor controller feature has been disabled, due to error during initialization:
Error occurred during motor object construction:
Error using ==> RS232DeviceBasic>RS232DeviceBasic.readStringRaw at 290
A timeout occurred before the Terminator was reached.
Error in ==> RS232DeviceBasic>RS232DeviceBasic.sendCommandReceiveStringReply at 199
resp = obj.readStringRaw(); %% throws (hware)
Error in ==> RS232DeviceBasic>RS232DeviceBasic.sendCommandSimpleReply at 206
resp = obj.sendCommandReceiveStringReply(command,varargin{:});
Error in ==> MP285>MP285.zprpSetVelocityAndResolutionOnDevice at 208
obj.hRS232.sendCommandSimpleReply(uint16(commandValue));
Error in ==> MP285>MP285.set.resolutionMode at 172
obj.zprpSetVelocityAndResolutionOnDevice();
Error in ==> MP285>MP285.MP285 at 105
obj.resolutionMode = resMode;
Error in ==> motorConfig>controllerConstruct at 379
hLSC = feval(controllerClass,pvArgs{:});
Error in ==> motorConfig>configurePrimaryMotor at 196
hLSC = controllerConstruct(ctlrInfo.Class,pvArgs);
Error in ==> motorConfig at 74
state.motor.motorOn = configurePrimaryMotor();
Error in ==> scanimage at 212
motorConfig(); %%VI042411A
*****
NI DAQmx: Detecting API version...Done! (9.3.x)
NI DAQmx: Caching API Data...Done!
NI DAQmx: Loading DLL...Done!
NI DAQmx: Caching API Data...Done!
opencfg: No configuration selected. Using 'default' values (i.e. those from current INI file).
After specifying the MO285 properties in the standard.ini file, we git this error (likely because it was the next time itried to talk to the MP285)
>> scanimage()
??? Attempt to reference field of non-structure array.
Error in ==> motorGetRelativeOrigin at 34
relOrigin = state.motor.hMotor.relativeOrigin;
Error in ==> SI3>SI3.roiUpdatePositionTable at 3266
relOrigin = motorGetRelativeOrigin();
Error in ==> SI3>SI3.roiAddPosition at 1334
obj.roiUpdatePositionTable();
Error in ==> SI3>SI3.SI3 at 253
obj.roiAddPosition(struct('motorX',nan,'motorY',nan,'motorZ',nan,'motorZZ',nan),0); %
create a 'root' all-NaN PDO
Error in ==> scanimage at 154
state.hSI = SI3();
This smells like the same problem with the MP285 that killed our attempts to run 3.7.1. We can talk to the controller fine with a putty serial connection. The comms settings match what is in the standard.ini. The controller has a very old firmware (2001) but the version WD3.4 seems to match the recommendation from the ScanImage wiki.