LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

esp300

I have a question about how to control the ESP300. What I want to do is to move my stage by the following sequence.

 

1 move stage 1mm

2 stop stage

3 move stage another 1mm

4 stop stage

5 repeat

 

To do that, I wrote the attached file. When I use 1 for numeric input, it works fine. However, if I try to loop, it does not work. Does anyone know problems here?

 

Thank you

0 Kudos
Message 1 of 5
(3,310 Views)

It looks like the flat sequence at the bottom of the block diagram is closing the serial port.  The loop keeps running after the serial port has been closed--I don't think you really want to do that.  Try running it with "Highlight Execution" turned on so you can see when things happen.

 

I assume you're talking about a Newport ESP-300?  

 

Ed

Edward Motts
Certified LabVIEW Associate Developer
0 Kudos
Message 2 of 5
(3,303 Views)

Thank you very much for your reply, Ed. Actually I got an example file from Newport and modified it, so I did not exactly know what is happening in the bottom code. As you said, the bottom port closed the serial port before the 2nd loop. So, I deleted the bottom diagram and did highlight execution. I worked fine if I use highlight execution mode, move, stop and move (when 2 is used for an input). However, when I go back to normal run, it only move once although 2 is an input. Do you know why this happens?

 

Thank you

 

ttnn 

0 Kudos
Message 3 of 5
(3,291 Views)

ttnn,

 

Well, there is another "Close Serial Port" in the other flat sequence structure on the left, which is getting fed into the loop.  And I don't see anything in your code that is doing the move, stop, move, stop that you describe.  The loop just sends the "PR" position relative command as many times as you go around the loop.  It's good to close the serial port after you're done with it, but you want to put that at the end of the program.

 

One reason that your .vi works in Highlight Execution and not at full speed may be that there is no delay in the loop.  An ESP-300 takes time to complete a move; any commands you send before the move is complete go into a stack, or they may be missed.  You could put a "Wait ms" function into the loop.  Also, here is an ESP-300 command "Wait Until Stopped" that you can use to wait until the current move is completed.  Sorry, I can't remember the code right now.  Maybe it's "WS"?

 

You can download the ESP-300 manual from Newport.  The ESP-301 is identical in function, just a different front panel.

 

I was very unimpressed with the example .vi's Newport provides.  Very crude, and not documented.  I would think that a prominent company like Newport could do better.  Or at least ask their customers to submit examples.

 

I'll look at this again when I get to work, where I have the manual.  If I can-- this promises to be a busy day.

 

Ed

Edward Motts
Certified LabVIEW Associate Developer
0 Kudos
Message 4 of 5
(3,276 Views)

Ed, 

 

  Thank you very much for your advice. With Wait ms, it works well. I'll also look at their manual about Wait until stopped. I appreciate your help.

 

Thank you

 

ttnn 

0 Kudos
Message 5 of 5
(3,265 Views)