MATLAB SETUP (copy from EM procedure, already complete for test bed computer)
- Make sure to be connected to JPL VPN if not on JPL network already when opening matlab.
- 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 - updated on 4/17/2017
- First of all, make sure ALL NST final inspection data (.csv files) are under
Dropbox\PFS_Production\XML_Files\AllNSTFinalData
All original NST data files are in Dropbox\PFS_Production\NST_FinalReports, organized by ship date.
- Under
Dropbox\PFS_Production\XML_Files
create a new folder with rail name (ex. spare1). This is called "rail folder"
- From Access database, by using Form called "CreatePidList", export an excel pid list file into this rail folder. (ex. PidListSpare1.xls)
- In Matlab, Execute the script:
readXLSwriteSML
(In case, the script lives in Dropbox\PFS_Production\CODE\MATLAB\generateXML)
- A dialog appears and asks you for the location of empty CobraConfig.xml file. Select
Dropbox\PFS_Production\XML_Files\EmptyCobraConfig57Cobras.xml
- 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 Cobra serial numbers include empty or invalid (without .csv file).
Starting mSim
- Start mSim for Camera by double clicking the mSimAndor shortcut on desktop
- Click Play (small triangle on the tool bar)
- Click Test when dialog comes up
- Run the script to connect camera
need script name
Loading XML into MSIM (from EM procedure)
- 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)
- 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
- Restart only Cobra MSIM
Generate Targets (EM procedure)
- Open and edit the inputs for the target generation script in Matlab to make targets: \Dropbox\PFS_EM\SVN\MATLAB\targGenerator.m
- Change the matlab directory to where you want the target files generated
- Run the script
- 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
- Restart MSIM
- Open the latest target script in Dropbox\PFS_EM\SVN\MSIM and edit it to have the right positioners
- Also check that fiducial definitions are correct and motor polarity's are right
Homing all Cobras
- In mSim, click "Load"
- Select Homing script from MSIM folder under Libraries
(Date)_home_All_GetAngles_(PositionerIDs).lst
- Click "Send"
Running Targets
- In mSim, click "Load"
- When prompted, select target script. It should be under MSIM folder under Libraries of sage
- Click "Send"
Target Convergence Analysis (for Prod Mini System Testbed)
- 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.
- Move the appropriate CobraConfig xml (the most recent file in explorer:Libraries->xmlfiles) used by MSIM into the test directory.
- Change the matlab current folder to the test directory in dropbox.
- Execute the following command to run the target analysis script:
analyzeTargetRun
- When prompted, select the appropriate xml which was used for the MSIM test. The one you moved into test directory.
- Run the script and mat files will be saved to the same log directory as the log txt files are in.
Motor Map Update
- Do a TargetConvergenceAnalysis as described above.
- Add your new test directory to the list of directories in the beginning of updateMotorMapsFromTargetData.m
- Uncomment all directories that contain data you want to include in the analysis.
- 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.
- 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.
- 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