Difference between revisions of "Lifefix users"

From DIDEAS Wiki
Jump to: navigation, search
m (safe startup)
m (log files)
 
(17 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
{{T_Lifefix}}
 
{{T_Lifefix}}
 
{{T_lf_tests}}
 
{{T_lf_tests}}
 +
=experimental results=
 +
[[ltf_science]]
  
 +
=log files=
  
 +
==500 hz data source==
 +
*On the LTF they're accessible from :
 +
*/mnt/ceb_svn_share/wifilog
 +
 +
*Or from else where on the net:
 +
*\\192.168.192.15\0svn\wifilog
 +
==text log file==
 +
* The text log for the LTF lives on the LTF itself: \\192.168.192.27\cbarn\src\pfcmd_python\wifilog
 +
*Locally as root : cd ~/pfcmd/wifilog/
 +
*To look for specific features (like startup times) : grep Startup stdout_log.txt
 +
*Or to count the number of cycles: grep PASS stdout_log.txt | grep -v END | wc
 +
*There is also program that can process the logfile and exact some of the parameters that might be of historical interest.
 +
 +
=static test=
 +
This tests will move the back drive motor a series of position - and hold that position - while applying various load currents to the robot motor.  The SWIFI and JR3 data will be captured for the test.
 +
 +
* prepare the life fixture and zero at the correct position with "move_ecat -z"
 +
* determine the range of motion required for the experiment.  verify with move_ecat
 +
**  eg: <strong>move_ecat -p 2 -i -10000 -f 15000 -r 1000 -a 2 -d 2 -m p2p</strong>
 +
 +
* cd to the directory ~/pfcmd  (eg ~root/pfcmd)
 +
* edit the program static_test.py to define the variables:
 +
<pre>
 +
EXPERIMENT_COPLEY_START_POSITION = 0
 +
EXPERIMENT_COPLEY_FINAL_POSITION = 1000
 +
EXPERIMENT_COPLEY_STEP_SIZE = 100
 +
ANKLE_MOTOR_CURRENT_STEP_RATE = 1.0;
 +
ANKLE_MOTOR_MAX_CURRENT = 4.0;      # keep below 7 amps - may overload even at 7 amps
 +
</pre>
 +
*run the program static_test as follows:
 +
<strong>python static_test.py -J -i sw8 -S</strong>
 +
*the primary results of the experiment will be output to the screen (and saved to a log file in wifilog/static_stdout_log.txt)
 +
*At the present time the JR3 and SWIFI data is not saved. (This is part of the dynamic - step response test.)
 +
*<strong>output to matlab on my PC is working again.</strong>
 +
 +
=pre test the lifefix with various move_ecat commands (TBC)=
 +
* use the following -F options:
 +
 +
    'ceb_pvt_full_speed.txt',          # F 0
 +
    'ceb_pvt_third_amp.txt',            # F 1
 +
    'ceb_pvt_half_amp.txt',            # F 2
 +
    'ceb_pvt_half_amp_double_time.txt', # F 3
 +
    'ceb_pvt_half_amp2.txt',            # F 4
 +
    'ceb_pvt_double_time.txt',          # F 5
  
=safe startup=
 
*<strong>As of 10-20-09 - change command line options for -c and -p to:  -c 2 -p 0</strong>
 
**To locate serial ports.  Run the program "python serial_port_helper.py"
 
  
[root@test-jig-4 pfcmd]# python serial_port_helper.py   
+
=serial port re-enumeration=
{'device': '/dev/ttyUSB1', 'name': '/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if01-port0'}
+
*<strong>As of 10-21-09 - application automatically locates serial ports. Thus -p and -c are no longer needed.</strong>
{'device': '/dev/ttyUSB2', 'name': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A70073vQ-if00-port0'}
 
{'device': '/dev/ttyUSB0', 'name': '/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if00-port0'}
 
  
** The charge amp (-c option) is the device "FTDI_FT232R_USB_UART_A70073vQ"And the outside electronics (-p option) is the FIRST (lower number) "/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if00"
+
 
 +
=safe startup=
 +
<strong>The -E 1 option sets the error level to stop running if there is an envelope error.  The enveloped are difficult to make and given how broken things are - not really useful at this timeThus set the error level to 0 with the command -E 0</strong>
  
 
* make sure copley is 'phased' and that the zero point is set  
 
* make sure copley is 'phased' and that the zero point is set  
Line 29: Line 73:
  
 
* Test that the app will run (-n 0 = do zero passes)
 
* Test that the app will run (-n 0 = do zero passes)
** <strong>./run_lifefix_v2.py -i sw8 -c 0 -p 2 -T 100 -F 1 -E 1 -n 0 -S</strong>
+
** <strong>./run_lifefix_v2.py -i sw8 -T 100 -F 1 -E 1 -n 0 -S</strong>
 
** ideally there will be no error messages and some matlab graphic output will appear
 
** ideally there will be no error messages and some matlab graphic output will appear
 
** if the swifi isn't working an error message will be output and the process stopped.
 
** if the swifi isn't working an error message will be output and the process stopped.
  
 
* Run the gentle cycle (-F 1) for 1 pass (-n 1)  with 100N of AK output (-T 100):
 
* Run the gentle cycle (-F 1) for 1 pass (-n 1)  with 100N of AK output (-T 100):
** <strong>./run_lifefix_v2.py -i sw8 -c 0 -p 2 -T 100 -F 1 -E 1 -n 1 -S</strong>
+
** <strong>./run_lifefix_v2.py -i sw8 -T 100 -F 1 -E 1 -n 1 -S</strong>
 
** there should be no python errors, however there will be an envelope error
 
** there should be no python errors, however there will be an envelope error
  
  
 
* Run the full cycle (-F 0) for 1 pass (-n 1)  with 100N of AK output (-T 100):
 
* Run the full cycle (-F 0) for 1 pass (-n 1)  with 100N of AK output (-T 100):
** <strong>./run_lifefix_v2.py -i sw8 -c 0 -p 2 -T 100 -F 0 -E 1 -n 1 -S</strong>
+
** <strong>./run_lifefix_v2.py -i sw8 -T 100 -F 0 -E 1 -n 1 -S</strong>
 
** there should be no python errors, however there will be an envelope error
 
** there should be no python errors, however there will be an envelope error
  
 
* Run the full cycle (-F 0) for 1 pass (-n 1)  with 2000N full thrust (-T 2000):
 
* Run the full cycle (-F 0) for 1 pass (-n 1)  with 2000N full thrust (-T 2000):
** <strong>./run_lifefix_v2.py -i sw8 -c 0 -p 2 -T 2000 -F 0 -E 1 -n 1 -S</strong>
+
** <strong>./run_lifefix_v2.py -i sw8 -T 2000 -F 0 -E 1 -n 1 -S</strong>
 
** there should be no python errors, and no envelope errors.
 
** there should be no python errors, and no envelope errors.
  
 
*proceed with a short run (100 passes) to verify operation
 
*proceed with a short run (100 passes) to verify operation
** <strong>./run_lifefix_v2.py -i sw8 -c 0 -p 2 -T 2000 -F 0 -E 1 -n 100 -S</strong>
+
** <strong>./run_lifefix_v2.py -i sw8 -T 2000 -F 0 -E 1 -n 100 -S</strong>
  
  
Line 61: Line 105:
 
*sometimes the SWIFI outputs garbage upon power up.  SWIFI needs to be power cycled to correct.
 
*sometimes the SWIFI outputs garbage upon power up.  SWIFI needs to be power cycled to correct.
 
**the lifefix program is now testing for valid SWIFI output.
 
**the lifefix program is now testing for valid SWIFI output.
 +
 +
= locate serial ports=
 +
*use the program serial_port_helper.py to list the boards.
 +
 +
[root@test-jig-4 pfcmd]# python serial_port_helper.py   
 +
{'device': '/dev/ttyUSB1', 'name': '/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if01-port0'}
 +
{'device': '/dev/ttyUSB2', 'name': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A70073vQ-if00-port0'}
 +
{'device': '/dev/ttyUSB0', 'name': '/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if00-port0'}
 +
 +
* The charge amp (-c option) is the device "FTDI_FT232R_USB_UART_A70073vQ". 
 +
* The outside electronics (-p option) is the FIRST (lower number) "/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if00"
 +
 +
=HARDWARE/FIRMWARE=
 +
*12-10-09 : Will update the MC firmware to the latest, and include the mode0 lowside changes.
 +
*12-9-09 : the lifefix uses FET #5 and SC/MC #8
 +
*12-9-09 : the firmware dates are:
 +
SC :
 +
  last_eco  1480
 +
  serial_nun  Oct 18 09 19:34:393
 +
  hw_pn  TESTJIG
 +
MC:
 +
    last_eco  1481
 +
  serial_nun  Oct 18 09 @ 19:36:33
 +
      hw_pn  LF_MCApp-Rev200\
  
 
=changes=
 
=changes=
Line 72: Line 140:
 
# The program monitors the SWIFI and will extend the cycle to read more SWIFI data.  IF the SWIFI stops transmission, the program should stop.  I'll soon add re-connect.  If the app stopps due to SWIFI connection, then just restart the application.
 
# The program monitors the SWIFI and will extend the cycle to read more SWIFI data.  IF the SWIFI stops transmission, the program should stop.  I'll soon add re-connect.  If the app stopps due to SWIFI connection, then just restart the application.
 
# The MPD protocol commands to the SC are via the USB serial port on COM2 (hence the -p 2 command line).  The MIT protocol data from the MC is still read back via the SWIFI.
 
# The MPD protocol commands to the SC are via the USB serial port on COM2 (hence the -p 2 command line).  The MIT protocol data from the MC is still read back via the SWIFI.
 +
=move_ecat=
 +
 +
*move_ecat -z
 +
*move_ecat -p 1 -i 0 -f 0 -r 1000 -a 1.5 -d -1.5 -m p2p
 +
=command line options=
 +
      print ' -p COM port for PFCMD '
 +
        print ' -c COM port for Charge Amp'
 +
        print ' -b baudrate for SWIFI serial'
 +
        print ' -i ip address of SWIFI'
 +
        print ' -F PVT file index # (0=full amp, 1=third amp [def], 2 = halp amp, 3=half amp double time) '       
 +
        print ' -S enable SWIFI dataport mode'       
 +
        print ' -L log file name (no logging without)'
 +
        print ' -J enable jr3 log'
 +
        print ' -s list serial ports and exit'
 +
        print ' -n number of passes (-H over rides)'
 +
        print ' -T thrust scale factor '
 +
        print ' -I minimum cycle interval (seconds)'
 +
        print ' -H total run time (hours)'
 +
        print ' -D debug level'
 +
        print ' -E error level'       
 +
        print
 +
  
 
=known issues=
 
=known issues=
  
 
[[Pf_insects]]
 
[[Pf_insects]]

Latest revision as of 17:26, 22 January 2010

PF Users Navigation:

Edit

experimental results

ltf_science

log files

500 hz data source

  • On the LTF they're accessible from :
  • /mnt/ceb_svn_share/wifilog
  • Or from else where on the net:
  • \\192.168.192.15\0svn\wifilog

text log file

  • The text log for the LTF lives on the LTF itself: \\192.168.192.27\cbarn\src\pfcmd_python\wifilog
  • Locally as root : cd ~/pfcmd/wifilog/
  • To look for specific features (like startup times) : grep Startup stdout_log.txt
  • Or to count the number of cycles: grep PASS stdout_log.txt | grep -v END | wc
  • There is also program that can process the logfile and exact some of the parameters that might be of historical interest.

static test

This tests will move the back drive motor a series of position - and hold that position - while applying various load currents to the robot motor. The SWIFI and JR3 data will be captured for the test.

  • prepare the life fixture and zero at the correct position with "move_ecat -z"
  • determine the range of motion required for the experiment. verify with move_ecat
    • eg: move_ecat -p 2 -i -10000 -f 15000 -r 1000 -a 2 -d 2 -m p2p
  • cd to the directory ~/pfcmd (eg ~root/pfcmd)
  • edit the program static_test.py to define the variables:
EXPERIMENT_COPLEY_START_POSITION = 0
EXPERIMENT_COPLEY_FINAL_POSITION = 1000
EXPERIMENT_COPLEY_STEP_SIZE = 100
ANKLE_MOTOR_CURRENT_STEP_RATE = 1.0;
ANKLE_MOTOR_MAX_CURRENT = 4.0;       # keep below 7 amps - may overload even at 7 amps
  • run the program static_test as follows:

python static_test.py -J -i sw8 -S

  • the primary results of the experiment will be output to the screen (and saved to a log file in wifilog/static_stdout_log.txt)
  • At the present time the JR3 and SWIFI data is not saved. (This is part of the dynamic - step response test.)
  • output to matlab on my PC is working again.

pre test the lifefix with various move_ecat commands (TBC)

  • use the following -F options:
   'ceb_pvt_full_speed.txt',           # F 0
   'ceb_pvt_third_amp.txt',            # F 1
   'ceb_pvt_half_amp.txt',             # F 2
   'ceb_pvt_half_amp_double_time.txt', # F 3
   'ceb_pvt_half_amp2.txt',            # F 4
   'ceb_pvt_double_time.txt',          # F 5


serial port re-enumeration

  • As of 10-21-09 - application automatically locates serial ports. Thus -p and -c are no longer needed.


safe startup

The -E 1 option sets the error level to stop running if there is an envelope error. The enveloped are difficult to make and given how broken things are - not really useful at this time. Thus set the error level to 0 with the command -E 0

  • make sure copley is 'phased' and that the zero point is set
  • power the AK, wait for the high pitch 'beep beep'
    • if a there is a low humm, then likely the commutation failed. The AK will retry. Hand adjust the back drive screw between attempts to help.
  • ideally be running the matlab plotter on CB's machine (This has to be running for now. TBF ASAP)
  • log on to the linux box as root
  • from /root cd to pfcmd (eg cd pfcmd) - this is a soft link to the correct directory
    • /home/cbarn/src/pfcmd_python (local copy of the program)
    • /mnt/ceb_svn_share/pfcmd_python (remote mounted copy of program)
  • Test that the app will run (-n 0 = do zero passes)
    • ./run_lifefix_v2.py -i sw8 -T 100 -F 1 -E 1 -n 0 -S
    • ideally there will be no error messages and some matlab graphic output will appear
    • if the swifi isn't working an error message will be output and the process stopped.
  • Run the gentle cycle (-F 1) for 1 pass (-n 1) with 100N of AK output (-T 100):
    • ./run_lifefix_v2.py -i sw8 -T 100 -F 1 -E 1 -n 1 -S
    • there should be no python errors, however there will be an envelope error


  • Run the full cycle (-F 0) for 1 pass (-n 1) with 100N of AK output (-T 100):
    • ./run_lifefix_v2.py -i sw8 -T 100 -F 0 -E 1 -n 1 -S
    • there should be no python errors, however there will be an envelope error
  • Run the full cycle (-F 0) for 1 pass (-n 1) with 2000N full thrust (-T 2000):
    • ./run_lifefix_v2.py -i sw8 -T 2000 -F 0 -E 1 -n 1 -S
    • there should be no python errors, and no envelope errors.
  • proceed with a short run (100 passes) to verify operation
    • ./run_lifefix_v2.py -i sw8 -T 2000 -F 0 -E 1 -n 100 -S


stopping

  • ESC terminates the program in the correct manner.
  • Do not use Ctrl-C



issues

  • SWIFI problems will abort the program. Need to do a re-connect.
  • sometimes the SWIFI outputs garbage upon power up. SWIFI needs to be power cycled to correct.
    • the lifefix program is now testing for valid SWIFI output.

locate serial ports

  • use the program serial_port_helper.py to list the boards.
[root@test-jig-4 pfcmd]# python serial_port_helper.py    
{'device': '/dev/ttyUSB1', 'name': '/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if01-port0'}
{'device': '/dev/ttyUSB2', 'name': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A70073vQ-if00-port0'}
{'device': '/dev/ttyUSB0', 'name': '/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if00-port0'}
  • The charge amp (-c option) is the device "FTDI_FT232R_USB_UART_A70073vQ".
  • The outside electronics (-p option) is the FIRST (lower number) "/dev/serial/by-id/usb-FTDI_Dual_RS232-HS-if00"

HARDWARE/FIRMWARE

  • 12-10-09 : Will update the MC firmware to the latest, and include the mode0 lowside changes.
  • 12-9-09 : the lifefix uses FET #5 and SC/MC #8
  • 12-9-09 : the firmware dates are:
SC : 
 last_eco  1480
 serial_nun  Oct 18 09 19:34:393
 hw_pn  TESTJIG
MC:
   last_eco  1481
 serial_nun  Oct 18 09 @ 19:36:33
      hw_pn  LF_MCApp-Rev200\

changes

  1. The command line options are somewhat different.
  2. The move_ecat program stays running for the entire run. python and move_ecat communicate via signals. we're doing a 88k cycle run - i hope there aren't memory issues!
  3. We're no longer using motor position as a trigger to start the thrust playback. Instead, after python sees the ACK from move_ecat, it forces the playback trigger.
  4. Belt testing is passive. The range of motion turning a PVT playback is check against a range.
  5. If the motor temperature exceeds 35C, then the cycle slows based on temperature.
  6. The relationship between the start of PVT playback and the thrust table payback has changed from previous experiments - but should be more constant.
  7. The program monitors the SWIFI and will extend the cycle to read more SWIFI data. IF the SWIFI stops transmission, the program should stop. I'll soon add re-connect. If the app stopps due to SWIFI connection, then just restart the application.
  8. The MPD protocol commands to the SC are via the USB serial port on COM2 (hence the -p 2 command line). The MIT protocol data from the MC is still read back via the SWIFI.

move_ecat

  • move_ecat -z
  • move_ecat -p 1 -i 0 -f 0 -r 1000 -a 1.5 -d -1.5 -m p2p

command line options

      print ' -p COM port for PFCMD '
       print ' -c COM port for Charge Amp'
       print ' -b baudrate for SWIFI serial'
       print ' -i ip address of SWIFI'
       print ' -F PVT file index # (0=full amp, 1=third amp [def], 2 = halp amp, 3=half amp double time) '        
       print ' -S enable SWIFI dataport mode'        
       print ' -L log file name (no logging without)'
       print ' -J enable jr3 log'
       print ' -s list serial ports and exit'
       print ' -n number of passes (-H over rides)'
       print ' -T thrust scale factor '
       print ' -I minimum cycle interval (seconds)'
       print ' -H total run time (hours)'
       print ' -D debug level'
       print ' -E error level'        
       print


known issues

Pf_insects