Post Go back to editing

Ace Remote Control From Python - Calling PullAllCaptureDataToFile

I would like to use the PullAllCaptureDataToFile from Python, via ACE Remote Control, to save data to the hard drive.

When I call PullAllCaptureDataToFile, I receive errors:

Error reading from AD4134: No method matches given arguments for PullAllCaptureDataToFile: (<class 'str'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'str'>)

This conflicts with the documentation from the ACE Remoting Console. When I type "HELP RUN PullAllCaptureDataToFile" into the ACE Remoting Console, it gives the following information for the function:

Arguments:
ExportPath (String):
The file path to export the data to. Note: directories must already exist, the file ending is trimmed, ignored and replaced with *.csv, *.bin or .bin.gz depending on file format and the device data source name is appended.

MaxSamples (Int32):
The maximum number of samples to pull to the file.

FileFormat (Int32):
The file format to use.

WaitTimeout (Int32):
The length of time to wait for data to become available to pull.

Tag (String):
The tag that was used to initiate the capture with.

My code is as follows:

client.Run('@AsyncDataCapture("dataset_name")')

client.PullAllCaptureDataToFile("C:\\Users\\userone\\AppData\\Local\\Analog Devices\\ACE\\ExportData\\AD4134\\dataset_name", 
-1, 
0, 
5000, 
"dataset_name")

which generates the error above:

Error reading from AD4134: No method matches given arguments for PullAllCaptureDataToFile: (<class 'str'>, <class 'int'>, <class 'int'>, <class 'int'>, <class 'str'>)

I would be grateful for any help or a code snippet that works. Thank you!



* Added an explanation for the documentation produced by the ACE Remoting Console
[edited by: LeeL at 8:56 AM (GMT -5) on 18 Feb 2022]

Top Replies

    •  Analog Employees 
    Feb 24, 2022 +1 verified

    Hi  ,

    Apologies for the delay in the response,

    I've done some testing of this, and found that your code is correct, except for the integer parameters, which actually need to be added in quotes to be…