Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Converting old STM to new PTM

Post Reply
testeng1
Posts: 2
Joined: February 9th, 2017, 11:44 am
Country: United States

Converting old STM to new PTM

Post by testeng1 » February 9th, 2017, 11:56 am

Now this may be a silly question, but i am working on changing over some older code and can't quite seem to find the command I am looking for in the scripting guide.

In the older code it appears to be saving data with the pdata command and reloading it using gdata. For the python update, the ACSPostDataDouble command appears to be storing the data where I want it, but I can't for the life of me find the corresponding command to call the data to use later.

Does anyone know if there is an existing command that pulls data saved by the ACSPostDataDouble command or is that something I will need to script myself?

testeng1
Posts: 2
Joined: February 9th, 2017, 11:44 am
Country: United States

Re: Converting old STM to new PTM

Post by testeng1 » February 14th, 2017, 7:43 am

Update: Couldn't find a corollary to ACSPostDataDouble so I ended up scripting my own data pull. Turns out the program stores the data in a csv file in the temp folder on the project. Ended up just hardcoding the path.

def ReadParam(name='', data='data'):
"""
VISIBILITY: NOT_HIDDEN
AUTHOR :
VERSION :
TYPE : standard
INPUTLIST
#Name, Type, Default Value, Min Value, Max Value, Unit
name,str,'',,,
END INPUTLIST
OUTPUTLIST
#Name, Type, DefaultValue, Unit
data,str,'data',
END OUTPUTLIST
DESCRIPTION
---name:
---data :
END DESCRIPTION
"""
filepath="C:\\ACS\\Projects\\project_name\\temp\\"
f=open(filepath+name+".csv",'r')
d1=f.readline(3)
data=float(d1)
return(data)

Post Reply

Return to “ACS Software Products”

Who is online

Users browsing this forum: No registered users and 2 guests