Jump to content

Start a simple scan automatically with Python


---
 Share

Recommended Posts

Hello everyone,

is there a simple way to start a scan with the ATOS 5 and ATOS Professional 2019 using Python and a few lines of code?

Thanks in advance.

Link to comment
Share on other sites

In addition, I created the following script with the recording function to start a scan:

# -*- coding: utf-8 -*-

import gom

# loop for automatic measurement repetition

GOM_MMT_RETRIES = 10
GOM_MMT_ERROR_CODES = ['MPROJ-0037']
while True :
	try:
		gom.script.atos.insert_scan_measurement (min_measurement_exposure_time=0.117497,reference_point_exposure_time=0.00898)
	except RuntimeError as ex:
		if GOM_MMT_ERROR_CODES and not ex.args[0] in GOM_MMT_ERROR_CODES : raise
		GOM_MMT_RETRIES -= 1
		if GOM_MMT_RETRIES <= 0 : raise
	else:
		break

# automatic repetition loop end

The scan worked without problems during the recording. But after starting the recording with the same start conditions as before, there appeared the error message "MATOS-S032: The online sensor movement cannot be checked.". The debugger identifies the line "gom.script.atos.insert_scan_measurment (...)" as the problem.

Any ideas?

Link to comment
Share on other sites

We just talked over the support line about this. The script checks for errors, which prevent the measurement process like movement etc. in the picture was no visible reference point, so no checks which work with reference points could be carried out. This script ran when the checks under acquisition -> acquisition parameters were disabled - placing a reference point in the camera picture would have worked, too.

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...