Synchronizing data and web cams

From Lehigh RTMD Wiki
Jump to: navigation, search

The following steps explain how to create an xPC model that will synchronize data across the SCRAMNet along with web cam images.

  1. Open the Metadata Generator on the RTMDsim PC.
  2. Select the required SCRAMNet channels and list other telepresence channels at the bottom.
  3. IMPORTANT: Select channel 61 for the Camera Trigger
  4. Under the Metadata tab, include the DAQ XML if required.
  5. Check Export xPC XML and Model files.
  6. Click Generate and follow the prompts.
  7. Once all the files are generated, open the 'model'_setup.m file and change 'sample' to the required sampling rate. (Note: the web cams will not respond over 10 samples per second.)
  8. Run the 'model'_setup.m file in the MATLAB workspace then open the Simulink 'model' file and build it. This will download it automatically to the xPC.
  9. Run CameraGrabber in SCRAMNet triggered mode.
  10. Run the xPC model. (See Running xPC Target Explorer)
  11. See xPC Data Converter for instructions on how to convert the xPC raw data. You will now have an Excel file that has synchronized data from SCRAMNet and a column with the counter number, which aligns to the filename of the webcam images.
Personal tools