Read actual positions from Newport stage controller instrument ESP302
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aram Zeytunyan
el 19 de Dic. de 2024
Comentada: Aram Zeytunyan
el 3 de En. de 2025
I have a Newport stage controller ESP302. I am able to successfully connect to the controller using the following line:
obj1 = tcpclient("192.168.254.254",5002,"ConnectTimeout",10);
I am also able to write commands to move the 3x stages connected to the controller to the desired positions. For example, to move stage 1 to the absolute position 75, I use the following:
writeline(obj1,'1PA75');
However, when I try to read the actual positions of the stages, I have to run the same query several times:
query(obj1,'1TP');
query(obj1,'1TP');
query(obj1,'1TP');
The first time it gives me 0, the second time it gives me the position of one of the other stages, and only the third time it gives me the actual position of Stage 1.
Looks like the problem is specific to Matlab, as the same commands work perfectly the first time when using the Newport application GUI. This is a problem as I need to read the stage positions quickly when the stages are in motion.
0 comentarios
Respuesta aceptada
Paul Lambrechts
el 23 de Dic. de 2024
Hi, I am not sure if this will help but I notice that you are using the old "query" command in combination with the new "tcpclient" object.
Try the new "readline" command instead: https://nl.mathworks.com/help/instrument/tcpclient.readline.html
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Support Packages en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!