Click here to return to 'SigmaStudio Scripting' page.
An automation client can be used to access the objects, properties, methods, and events associated with the SigmaStudioServer interface. SigmaStudioServer is a .NET server as well as an ActiveX server.
To access the server interface, SigmaStudio and the client application have to be launched on the same PC, and then the client application has to point to the Analog.SigmaStudioServer.dll which is installed alongside SStudio.exe in the SigmaStudio program folder.
Once the server interface is launched, the following commands are available for use.
Start a new SigmaStudio project
bool NEW_PROJECT();
Open a SigmaStudio project file (*.dspproj)
Bool OPEN_PROJECT( string fullyQualifiedFileName );
Compile (compile,link,download) the active SigmaStudio project
bool COMPILE_PROJECT();
Link the active SigmaStudio project
bool LINK();
Compile the active SigmaStudio project
bool COMPILE();
Download the active SigmaStudio project
bool DOWNLOAD();
Link/Compile/Download the SigmaStudio project, specified as an .NET CLR compatible System.String
bool COMPILE_PROJECT_NAME( string projectName );
Close the active SigmaStudio project
bool CLOSE_PROJECT();
Close SigmaStudio project by project name
bool CLOSE_PROJECT_NAME( string projectName );
Save the active SigmaStudio project
bool SAVE_PROJECT();
Save the active SigmaStudio project under the mentioned name
bool SAVEAS_PROJECT( string saveAsFileName );
Save a SigmaStudio project to file
bool SAVE_PROJECT_NAME( string projectName );
Save a SigmaStudio project under the mentioned name
bool SAVEAS_PROJECT_NAME( string projectName, string saveAsFileName );
Set a specified SigmaStudio project as the active project
bool SET_ACTIVE_PROJECT( string projectName );
Set a specified SigmaStudio board as the active board
bool SET_ACTIVE_BOARD( string boardName );
Set Schematic Sampling Rate for the SigmaStudio project
bool SET_SAMPLING_RATE( int samplingRate );
Propagate the Schematic Sampling Rate across the Schematic
bool PROPAGATE_SAMPLING_RATE();
Set Block Size for the SigmaStudio project
bool SET_BLOCK_SIZE ( string ICname, int nSize );
Toggle the Freeze/Unfreeze state of the schametic
bool TOGGLE_FREEZE_SCHEMATIC( string password );
Delay a SigmaStudio script for period specified as an argument
bool DELAY_SCRIPT( int delayMilliseconds );
Set SigmaStudio Server API wait timeout for the script. The default timeout set as 30 sec.
bool SET_TIMEOUT( int timeOutSeconds );
Write bytes to IC register(s) (active project must be compiled and downloaded)
bool REGISTER_WRITE_BYTES(int numOfBytesToWrite, byte[] writeToData, int protocol, int chipAddress, int writeAddress, int addressWidth, int registerByteLength, int communicationChannel, int ICType);
Write to IC register (active project must be compiled and downloaded)
bool REGISTER_WRITE( string ICName, int writeAddess, int numBytesToWrite, int dataToWrite );
Write data array to IC regster(s)
bool REGISTER_WRITE_ARRAY( string ICName, int writeAddress, int numBytesToWrite, byte[] aDataToWrite );
Read bytes of data from an IC register(s) (active project must be compiled and downloaded)
byte[] REGISTER_READ_BYTES(int numOfBytesToRead, int protocol, int chipAddress, int readAddress, int addressWidth, int registerByteLength, int communicationChannel, int ICType);
Read from an IC register (active project must be compiled and downloaded)
long REGISTER_READ( string ICName, int readAddess, int readNumberBytes );
Read array of data from an IC register(s)
byte[] REGISTER_READ_ARRAY( string ICName, int readAddress, int readNumberBytes );
Safeload write data to IC register
bool REGISTER_SAFELAOD_WRITE( string ICName, int writeAddress, int numBytesToWrite, int dataToWrite );
Safeload write data array to IC regster(s)
bool REGISTER_SAFELAOD_ARRAY( string ICName, int writeAddress, int numBytesToWrite, byte[] aDataToWrite );
Write value to a Parameter, SStudio handles conversion
bool PARAMETER_WRITE( string ICName, int writeAddress, int intbits, int fracbits, float valToWrite );
Write value to a Parameter using the parameter's name, SStudio handles conversion
bool PARAMETER_WRITE_USING_NAME(string icName, string paramName, int intbits, int fracbits, float dataToWrite);
Write parameters values, SStudio handles conversion
bool PARAMETER_WRITE_ARRAY( string ICName, int writeAddress, int intbits, int fracbits, int numValsToWrite, float[] aValsToWrite );
Write parameters values, SStudio handles conversion
bool PARAMETER_WRITE_ARRAY_USING_NAME( string ICName, string paramName, int intbits, int fracbits, int numValsToWrite, float[] aValsToWrite );
Write value to a Parameter as float
bool PARAMETER_WRITE_FLOAT( string ICName, int writeAddress, float valToWrite );
Write value to a Parameter as float using the parameter name instaed of the parameter address.
bool PARAMETER_WRITE_FLOAT_USING_NAME( string ICName, string paramName, float valToWrite );
Write parameter values as float
bool PARAMETER_WRITE_ARRAY_FLOAT( string ICName, int writeAddress, int numValsToWrite, float[] aValsToWrite );
Write parameter values as float using the parameter name
bool PARAMETER_WRITE_ARRAY_FLOAT_USING_NAME( string ICName, string paramName, int numValsToWrite, float[] aValsToWrite );
Read parameter value from a register
float PARAMETER_READ( string ICName, int readAddress, int intbits, int fracbits );
Read parameter value from a register
float PARAMETER_READ( string ICName, string paramName, int intbits, int fracbits );
Read float parameter value from a register
float PARAMETER_READ_FLOAT( string ICName, int readAddress );
Read float parameter value from a register using the paramete name
float PARAMETER_READ_FLOAT_USING_NAME( string ICName, string paramName);
Read array of parameters
float[] PARAMETER_READ_ARRAY( string ICName, int readAddress, int intbits, int fracbits, int numValsToRead );
Read array of parameters
float[] PARAMETER_READ_ARRAY_USING_NAME( string ICName, string paramName, int intbits, int fracbits, int numValsToRead );
Write parameter value via safeload
bool PARAMETER_SAFELAOD_WRITE( string ICName, int writeAddress, int intbits, int fracbits, float valToWrite );
Write data to parameters via safeload
bool PARAMETER_SAFELAOD_ARRAY( string ICName, int writeAddress, int intbits, int fracbits, int numValsToWrite, float[] aValsToWrite );
Write parameter value via safeload as float
bool PARAMETER_SAFELOAD_WRITE_FLOAT( string ICName, int writeAddress, float valToWrite );
Write data to parameters via safeload as float
bool PARAMETER_SAFELOAD_ARRAY_FLOAT( string ICName, int writeAddress, int numValsToWrite, float[] aValsToWrite );
Run SigmaStudio script
bool RUN_SCRIPT( string script );
Open and Run SigmaStudio script file
bool RUN_SCRIPT_FILE( string fullyQualifiedFileName );
Undo the last operation performed on active SigmaStudio project
bool UNDO_SCRIPT();
Redo the last operation on active SigmaStudio project
bool REDO_SCRIPT();
Undo the last operation performed on SigmaStudio project
bool UNDO_SCRIPT_PROJECT( string projectName );
Redo the last operation on SigmaStudio project
bool REDO_SCRIPT_PROJECT( string projectName );
Auto dismiss all error,warning, and notifications and log messages to a file
bool SET_LOGGING_MODE( bool enabled );
Insert an object to Schematic
bool INSERT_OBJECT( string objectTypeName );
Insert an object to Schematic at specified location
bool INSERT_OBJECT_POINT( string objectTypeName, int pointX, int pointY );
Insert a block object to Schematic
bool INSERT_BLOCKOBJECT( string objectTypeName );
Insert a block object to Schematic at specified location
bool INSERT_BLOCKOBJECT_POINT( string objectTypeName, int pointX, int pointY );
Remove an object from a Schematic
bool REMOVE_OBJECT( string objectName );
Establish connection betweenn pins belonging to two objects
bool CONNECT_OBJECT( string fromObjectName, int fromOutPinIndex, string toObjectName, int toInPinIndex );
Remove a connection betweenn two objects
bool DISCONNECT_OBJECT( string fromObjectName, int fromOutPinIndex, string toObjectName, int toInPinIndex);
Manage the properties of the objects on the active praoject
bool SET_OBJECT_PROPERTY( string opcode, string objectName, params object[] propertyParams);
Export the system files of the active project
bool EXPORT_SYSTEM_FILES( string fullyQualifiedFileName );
Generate SigmaStudio plugin using Algorithm Designer
bool BUILD_DESIGNER_DLL( string ICName, string fullyQualifiedProjectName, string fullyQualifiedLibraryName );
Boot SHARC with a loader (*.ldr) file
bool BOOT_SHARC( string ICName, string fullyQualifiedFileName );
Read MIPS consumed by the Target SHARC hardware
float READ_MIPS_SHARC( string ICName );
Read version number of the software running on target SHARC processor
uint READ_VERSION_SHARC( string ICName );
Modify SigmaStudio settings
bool MODIFY_DESIGN_SETTINGS ( string cmd, params object[] arg );
Modify IC Control window properties
bool MODIFY_IC_CONTROL_PROPERTIES ( string ICName, string cmd, object arg );
Enable or Disable a Plug-In in the Add-Ins Window
bool MODIFY_PLUGIN_STATUS ( string plugin, bool state );
Fetch the properties of the objects on the active project
bool GET_OBJECT_PROPERTY(string opcode, string objectName, out object[] getPropVal, params object[] propertyParams)
opcode → Opcode of function to perform (see below)
objectName → Name of the object to update
getPropVal → Fetched property or parameters
propertyParams → Parameters associated with the specified opcode
The property interface require an opcode (Operation Code), which specifies the type of operation to be performed. Essential opcodes are listed in the table below:
Opcode | Type | PropertyParams |
---|---|---|
getBlockSize | 1. None | NA |
getSamplingRate | 1. None | NA |
getControlValue | 1. int | Index of Algorithm |
2. int | Repeat Index (Grow index) | |
3. System.String | Control value name | |
getCurrentGrowth | 1. int | Index of Algorithm |
NOTE: Control value names can be viewed as tooltip information. Please refer Viewing Control Parameter Names .