LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Newport SMC 100 and VISA read in 1073807298

I am working with a Newport motor controlled with a SMC100 controller.  I got the drivers for this motor here: 

ftp://download.newport.com/MotionControl/Current/MotionControllers/SMC100/Software/

 

I am getting very inconsistent errors that I believe are timing related, but haven't had much success in fixing it consistently.  The vi that I'm using as a base is the SimpleControlExample and vis contained within.  The error that sometimes gets thrown is -1073807298 and this sample vi points to the problem as"VISA Read in read_write.vi->tell current position.vi->Simple_Contol_Newport_mod.vi"

 

The first thing I tried was to modify the timing in the read_write.vi and this seemed to solve the problem.  A few hours later though, it came back (I'm saving files that work as I go along to check whether the problem is modifications I'm making, and this is not the case here).  In the upper level vi, I added timing delays which also worked temporarily, but the problem eventually crept in again.  It's always in the same spot - the Read VISA within the read_write.vi in the tell current position.vi

 

I looked up several possible solutions for this error number and tried all that I found.  I am using a third party serial-USB conversion, but I have no problems initializing the port or homing the motor.  I tried adding in a VISA Set buffer I/O size as was suggested elsewhere and this didn't fix the problem either.  When this error pops up, sometimes the motor will still go to the set position despite the error, sometimes not.

 

Happy for any thoughts or suggestions!

0 Kudos
Message 1 of 4
(3,358 Views)

Are you using Bytes at Port for your Reads? If so, do you have a termination character you can use instead?

If you clear the error and flush the port, does the program work if you continue?


GCentral
0 Kudos
Message 2 of 4
(3,326 Views)

Thanks for the response.  I am using a Bytes to Port for the read, but I believe the termination character is set up in the port initialization step.  Clearing the error and flushing the port don't seem to have any effect.  I tried adding a clear and a flush to the read, this also didn't help.  I also tried adding a lock and unlock to the read step, which also didn't solve it.  I'm beginning to wonder if the timing "fixes" I was seeing weren't really temporary fixes and that this is a port initialization problem as might be indicated by the error number given.  It seems a little weird that the motor would successfully home but not position if it was a port problem, but this seems to one possible cause.  I'm not entirely sure how to implement the fix described here in the port init.vi supplied by Newport (http://digital.ni.com/public.nsf/allkb/0C2ABA463217342686256E2E006DF187) - it actually looks like they've already done this.  However, I noticed that the properties that the Newport vi specifies are different from those shown in NIMAX.  NIMAX won't let me change those parameters to match the vi (says it's not an allowed configuration).  If I change the vi to match NIMAX, I lose any communication with the motor - it doesn't even run through the homing step.

 

I've attached the two suspicious sub-vis here. Thanks for any ideas...

 

 

 

Download All
0 Kudos
Message 3 of 4
(3,293 Views)

So the error is being thrown when the read-write.vi is called with the "Query" input as true.

 

I've coded a slightly altered VI - can you test this one in place of the read-write VI and see if it improves anything?


GCentral
Message 4 of 4
(3,287 Views)