MATLAB SETUP (copy from EM procedure, already complete for test bed computer)

  1. Make sure to be connected to JPL VPN if not on JPL network already when opening matlab.
  2. Make sure the following are on your matlab path and saved.
Dropbox\PFS_EM\SVN\MATLAB
Dropbox\PFS_EM\SVN\MATLAB\lib
Dropbox\PFS_EM\SVN\MATLAB\peter\download
Dropbox\PFS_EM\SVN\MATLAB\peter\lib
Dropbox\PFS_Production\CODE

Motor Map Creation from NST data - to be updated later

  1. Under Dropbox\PFS_Production\XML_Files, create a new folder with rail name (ex. EMrail). This is called "rail folder"
  2. In the rail folder, create excel file that contains PID on A column, and serial numbers (without C on B column). (ex. EMrailPidSnList.xlsx)
  3. Copy all NST data files that is included in this rail into the rail folder. All original NST data files are in Dropbox\PFS_Production\NST_FinalReports, organized by ship date. Ship date of every Cobra is recorded in the receiving inspection database.
  4. In Matlab, Execute the script:
    readXLSwriteSML
    (In case, the script lives in Dropbox\PFS_Production\CODE\MATLAB\generateXML)
    1. A dialog appears and asks you for the location of NST data files. Select the rail folder.
    2. After creating the initial motor maps and displaying figures, a dialog will appear and ask you to specify a name for a new XML file. Convention is "rail_(#)_(Date)_v1.xml"
  • Script will not work if Dropbox\PFS_Production\XML_Files\EmptyCobraConfig58Cobras.xml is removed or renamed.

Starting mSim

  1. Start mSim for Camera by double clicking the mSimAndor shortcut on desktop
  2. Click Play (small triangle on the tool bar)
  3. Click Test when dialog comes up
  4. Run the script to connect camera
     need script name 

Loading XML into MSIM (from EM procedure)

  1. Copy the XML file into the MSIM xml folder: D:\DevCodePft\Main\user\xml_files (There should be a link to this under Sage's Libraries)
  2. Load the XML file with MSIM and save it.(Commands can be found in MSIM under: Commands -> Database Commands) Verify in the MSIM log that this goes ok.
    cmd_load_Xml_file_to_Database  yourXmlFilenameWithNoXmlExtension
    cmd_save_Database  
    
  3. Restart only Cobra MSIM

Generate Targets (EM procedure)

  1. Open and edit the inputs for the target generation script in Matlab to make targets: \Dropbox\PFS_EM\SVN\MATLAB\targGenerator.m
  2. Change the matlab directory to where you want the target files generated
  3. Run the script
  4. Move the resulting TargetList_mId_#_pId_#.txt files to D:\PfsTests\Targets IMPORTANT: Dont overwrite existing ones. Create an archive folder and move them there first
  5. Restart MSIM
  6. Open the latest target script in Dropbox\PFS_EM\SVN\MSIM and edit it to have the right positioners
    1. Also check that fiducial definitions are correct and motor polarity's are right

Homing all Cobras

  1. In mSim, click "Load"
  2. Select Homing script from MSIM folder under Libraries
     (Date)_home_All_GetAngles_(PositionerIDs).lst 
  3. Click "Send"

Running Targets

  1. In mSim, click "Load"
  2. When prompted, select target script. It should be under MSIM folder under Libraries of sage
  3. Click "Send"

Target Convergence Analysis (for Prod Mini System Testbed)

  1. Copy MSIM target log dir on testbed computer (eg: D:\PfsTests\06_16_14_10_36_21_TargetRun\Log) to the drobox test results target convergence folder (Dropbox\PFS_EM\TEST_RESULTS\TargetConvergenceEMDowns\). Rename the log directory in dropbox to have the same name as the mother directory on testbed computer (eg: 06_16_14_10_36_21_TargetRun). This directory will now be referred to as the test directory here. Remove log file from the directory because it is very large.
  2. Move the appropriate CobraConfig xml (the most recent file in explorer:Libraries->xmlfiles) used by MSIM into the test directory.
  3. Change the matlab current folder to the test directory in dropbox.
  4. Execute the following command to run the target analysis script:
    analyzeTargetRun
  5. When prompted, select the appropriate xml which was used for the MSIM test. The one you moved into test directory.
  6. Run the script and mat files will be saved to the same log directory as the log txt files are in.

Motor Map Update

  1. Do a TargetConvergenceAnalysis as described above.
  2. Add your new test directory to the list of directories in the beginning of updateMotorMapsFromTargetData.m
  3. Uncomment all directories that contain data you want to include in the analysis.
  4. Run the script with your latest xml and take a thorough look at the results. Look for extreme map values and decide whether it is realistic and ok for the positioner to have these values.
  5. Follow the Loading XML into MSIM procedure above.

Exporting XML from MSIM (from Mini System Testbed)

NOTE: The exported XML file will not contain several sets of data necessary for some matlab scripts. This includes fiducial positions and min/max joint angles.
  1. From MSIM dialog send the following command with the argument name according to what you want the XML saved as. Don't include the xml extension.
cmd_save_Database_to_xml_file  yourxmlfilename

Running Link Length

Analyzing Link Length

-- MitsukoRoberts - 06 Apr 2016

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2016-04-06 - MitsukoRoberts
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback