ACE to DAC Commands Syntax This document lists the syntax of the commands that can be sent to the DAC via the ACE command interface console Last updated: 02/19/2015 By Pietro Bernasconi JHU/APL isDACOK() Simple acknowledgement command to check on DAC health. DACCmd(string COMMAND, string *REPLY) COMMAND = string with the command that the DAC understands and must adhere to the syntax defined in the ACE-DAC ICD REPLY = pointer to a string where the DAC reply is returned. Low level basic command to communicate to the DAC using the command socket. All commands listed in this document use this basic command. If used from the python command console the REPLY pointer to a string must be created FIRST. To create this string pointer in the python console use the ACE command: r = ptrCharCreate(<int string_length>, <string initial_value> To view the string content use the following ACE command: ptrCharShow(r) The example below reproduces a call identical to isDACOK() but done entirely manually from the ACE python command console: r = ptrCharCreate(128, “nothing”) <- creating reply pointer to string ace2DACCmd(“OK \n”, r) <- sending the OK command to DAC ptrCharShow(r) <- viewing the DAC reply OK <- DAC reply displayed on screen scanStart(unsigned int SCAN_TYPE, unsigned char VERBOSITY) ID = scan ID number that uniquely identifies the scan SCAN_TYPE = number that specifies what type of scan is it: 0 = Source (SRC) 1 = Reference (REF) 2 = On-the-Fly map (OTF) 3 = Scan with HOT load on (HOT) 4 = Scan with COLD load on (COLD) VERBOSITY = type of data returned by the DAC: 0 = Silent mode -> returns NO data to the ACE 1 = Returns QUICKLOOK data to the ACE 2 = Returns FULL science frame as taken by the DAC Commands the DAC/instrument to begin a scan with ACE auto generated ID scanStartID(unsigned int ID, unsigned int SCAN_TYPE, unsigned char VERBOSITY, int OT_ROW#, char OBJ_NAME) ID = scan ID number that uniquely identifies the scan SCAN_TYPE = number that specifies what type of scan is it: 0 = Source (SRC) 1 = Reference (REF) 2 = On-the-Fly map (OTF) 3 = Scan with HOT load on (HOT) 4 = Scan with COLD load on (COLD) VERBOSITY = type of data returned by the DAC: 0 = Silent mode -> returns NO data to the ACE 1 = Returns QUICKLOOK data to the ACE 2 = Returns FULL science frame as taken by the DAC OT_ROW# = Row number either in the OT or the RT table that generated this scan command. If <=0 then it was not generated from an OT or RT table. OBJ_NAME = max 15 characters string with description of the celestial object being scanned Commands the DAC/instrument to begin a scan with specific ID scanStop() Commands the DAC/instrument to stop a scan previously started DACSystem(string COMMAND) COMMAND = string command that the DAC will execute using the “system” linux command This command instructs the DAC to execute a “system” command call dataProcLevelSet(unsigned char LEVEL) LEVEL = data processing level: 0 = No processing performed & STOP processing 1 = Return Level 2+ data only (moment maps for OTF & truncated spectra for PS) 2 = Return FITS cubes of spatially- and spectrally- truncated data (OTF) 3 = Return FITS cubes of spectrally truncated data (OTF) 4 = Return nominal survey data FITS cubes (OTF & PS) Sets the level of how much background data processing the DAC should do sciencePathSet(string PATH) PATH = string with the FULL science path Sets the path where in the ACE file system the DAC has to dump the science data files. quicklookPathSet(string PATH) PATH = string with the FULL quicklook path Sets the path where in the ACE file system the DAC has to dump the quicklook data files. dataSend(unsigned int ID_STRT, unsigned int ID_END, unsigned int PRIORITY) ID_STRT = scan ID number of beginning of range of scans to be sent down ID_END = scan ID number of end of range of scans to be sent down PRIORITY = 0: send data down next time verbosity not 0; 1: send data immediately Command to request the DAC to transmit old data from a particular scans IDs range. If start and end ID is the same it sends down data for a single scan. fileSend(unsigned int ID_STRT, unsigned int ID_END, unsigned int PRIORITY) ID_STRT = file ID number of beginning of range of scans to be sent down ID_END = file ID number of end of range of scans to be sent down PRIORITY = 0: send data down next time verbosity not 0; 1: send data immediately Command to request the DAC to transmit old data from a particular files IDs range. If start and end ID is the same it sends down data for a single file. DACWathc(string PARAMETER, unsigned char SLOT#) PARAMETER = string with the name of the parameter to “watch” SLOT# = number of the slot (0 – 3) of the 4 possible watcher channels where the parameter values will be seen in the DAC housekeeping Command to set a specific DAC internal parameter to be “watched”, i.e. sent down via the DAC housekeeping channel DACAltSet(double ALTITUDE) ALTITUDE = Gondola altitude in meters Sends to the DAC the current gondola altitude information DACShutdown() Command to alert the DAC that an imminent gondola power shutdown will occur. After sending the command to the DAC the ACE will wait for up to 40 seconds for a reply from the DAC indicating completion of orderly shutdown of its subsystems. DACSocketSend(unsigned short COMPUTER_ID, unsigned short PORT, string COMMAND) COMPUTER_ID = last part of the computer IP address to which the command is to be sent to: 11, 12, or 14 (for 192.168.0.11, … ) PORT = socket port number to which send the command: 9001, 9002, 9003, or 9734 COMMAND = string with the verbatim command that will be sent through the designated socket to the designated computer. ACE sends to the DAC a command that the DAC will send to one of the instrument computers using the appropriate socket. cmdConnectOpen(bool RESET_DAC) RESET_DAC = 0 = ACE will NOT reset the DAC if DAC was not responsive to this command 1 = ACE WILL send a DACReset() command if DAC not responsive WARNING! This parameter should always be set to 0 when given from the ACE python command console !! Opens the ACE-DAC command socket cmdConnectKill() Terminates the command socket wDconnectOpen() Opens the DAC WATCHDOG socket wDconnectKill() Terminates the DAC watchdog socket. WARNING ! This should NOT be used from the ACE python command console! hskpConnectOpen() Opens the housekeeping socket hskpConnectKill() Terminates the housekeeping socket hskpIntervSet(unsigned int INTERVAL) INTERVAL = cadence in seconds Informs the DAC at what cadence the DAC should send housekeeping packets to the ACE DACReset() Sends a command to the DAC watchdog to reset the DAC process