Friday, March 23, 2012

Regarding .m Files in the SVN Server

All,
I have also sent you an e-mail including the checkout string and the credentials to the SVN server. For those who are not familiar with SVN clients available for their platform; here are good suggestions.
Let me know if you have any issues so that I can check the server to see if everything is working properly.

The easiest way to use the camera to acquire images & videos is to use imaqtool function, which is a GUI developed by Mathworks. You can read more about it here.

For example to collect a video simply set the Frames per trigger option under the Acquisition Parameters / General to Infinite.
Then use the Start/Stop Acquisition buttons to record a video. You can click on Export Data button to save the acquired video in .mat format. The .mat file you have saved will include a 4-D matrix. (As far as I am concerned) The first two dimensions form the resolution of the image hence they represent the pixel indexes, the third dimension represents the type of the sensor (R G B depending on the encoding selected) and the forth dimension represents the frame number.
Unfortunately/fortunately Matlab does not export the data in a video format. As I just mentioned it outputs a 4-D Matrix.
However we can create movies using the 4-D matrix outputted by the IMAQ.

Under repo/AISProject/ThermalCamera/code you will find 3 .m files, which are:

GUIdemo.m
imaqthermal.m
make_movie.m

and a .mat file which contains the data I have acquired to generate the video in one of the previous posts:

lighter_vid.mat

You can use make_movie function to create your own movie in '.avi' format from the obtained 4-D matrix. Simply type help make_movie to see the usage and required input/output parameters. An example usage is as follows:

load('lighter_vid.mat');
[A]=make_movie(lighter_vid,'trial.avi',16,75)

This will output an A matrix which is in Matlab movie format. You can read more about it here.
Also the make_movie function will output an '.avi' version of the video as 'trial.avi' in this case. You should see it in your workspace.

The imaqthermal.m is a simple function call to a GUI which I have adopted from a motion detector developed by Mathworks. You can use the GUIdemo function to create a video object and call the GUI.
Simply make sure that the camera is connected to your ethernet port and call GUIdemo.

Enjoy!

Emre

Thermal Camera Image Acquisition Toolbox Setup

All,

I will list the steps that I have taken to adjust the settings of my Mac to make the FLIR thermal camera work with Matlab Image Acquisition Toolbox. I will also try to lead other platform users to important websites.
  1. (For Mac users) Make sure you have the R2011b version on your Mac which is already available via CMU computing services. This is the only version that supports Image Acquisition Toolbox for Mac.
    Similarly Windows users can check the system requirements here.
  2. Make sure you have the latest version of the Matlab Image Acquisition Toolbox.
    If you have used CMU computing services to obtain the latest copy of Matlab and followed the suggested steps you should be good to go. The toolbox will be automatically installed on your platform.
  3. The FLIR Thermal camera supports GigE . So we have to install the GigE vision drivers. A good tutorial is given here. For troubleshooting you can also consult here.
  4. When you are done with setting up the GigE drivers, type imaqhwinfo in Matlab command window and check the available adapters list. You should see 'gige' in the list.
  • Note for Mac users: If you do not have the development tools or you cannot access ~/.MacOSX/environment.plist while configuring GenICam environment variables, here is the workaround:
    -Open up a terminal window and type sudo vi /etc/launchd.conf
    -Add the following lines to launchd.conf and save.
  • setenv GENICAM_CACHE_V2_2 /Users/username/.GenICam/xml/cache
  • setenv GENICAM_LOG_CONFIG_V2_2/Applications/GenICam/V2_2_0/log/config_unix/DefaultLogging.properties
  • setenv GENICAM_ROOT_V2_2 /Applications/GenICam/V2_2_0
      • -Finally type export to see if the environment variables are set correctly, you should see these three variables within the output.

        Let me know if you face any troubles.

        Thanks,
        Emre

        GigE working through Matlab

        All,
        I have managed to use the thermal camera with the Data Acquisition Toolbox.
        Also I have modified a simple GUI by Mathworks to obtain live data stream.
        Once we obtain the transfer function I will rescale the colorbar to represent the actual temperature. I will also share the code through a more detailed post.

        Cheers,

        Emre


        Monday, February 27, 2012

        All,

        For Group 2 we have to figure out whether the lighting wiring has its own dedicated circuit or not so that we can provide them with the power consumption. Also the granularity of the power value seems important.

        Thanks,

        -Emre

        Modbus PI Interface Documentation

        All,

        Here is the link to PI Modbus interface.

        Thanks,

        -Emre

        Tuesday, February 21, 2012

        sensors in IBM Lab


        sensors in A13

        PH.VAV.RMA13.ROOM TEMP (Room Temperature Sensor) [I/O time out]
        Porter Hall. A level. A13.Airflow (Airflow sensor) [400]
        Porter Hall. A level. A13.CLG Flow Max (Cooling flow maximum value) [ 640]
        Porter Hall. A level. CLG Flow Min (Cooling flow minimum value) [ 400]
        Porter Hall.A level. Control Setpoint (Control Setpoint) [73]
        Porter Hall. A level.A13.Control Temperature (Control Temperature)[72.75]
        Porter Hall. A level. A13. Damper Command (Damper Command) [37.6]
        Porter Hall. A level. A13. Damper Status (Damper Status) [0]
        Porter Hall. A level. A13. Day CLG Setpoint (Day cooling Set point)[74]
        Porter Hall. A level. A13. Day HTG Setpoint (Day Heating Set point)[70]
        Porter Hall. A level. A13. Day.Night (Day/Night Value)[0]
        Porter Hall. A level. A13. DI OVRD SW (Status of the override switch at the room temp sensor) [0]
        Porter Hall.A level. A13.Discharge Temp (Discharge Temp) [71]
        Porter Hall.A level. A13.Duct Area (Duct Area) [0.55]
        Porter Hall.A level. A13.Error Status (Error Status) [0]
        Porter Hall.A level. A13.Flow (Flow) [100]
        Porter Hall.A level. A13. Flow Coeff (Flow Coefficient) [0.65]
        Porter Hall.A level. A13. Flow End (Flow End) [100]
        Porter Hall.A level. A13.Flow Setpoint (Flow Setpoint) [100]
        Porter Hall.A level. A13.Flow Start (Flow Start)[0]
        Porter Hall.A level. A13.Heat. Cool [1]
        Porter Hall.A level. A13.HTG Flow Max (Heating Flow Max) [400]
        Porter Hall.A level. Area13. HTG Flow Min (Heating Flow Min) [400]
        Porter Hall.A level. A13.MTR Setup (Motor Setup) [5]
        Porter Hall.A level. A13.MTR2 Timing (Motor 2 Timing)[130]
        Porter Hall.A level. A13.Night CLG Setpoint (Night Cooling Set point)[82]
        Porter Hall.A level. A13.NIght HTG Setpoint (Night Heating Set point)[65]
        Porter Hall.A level. A13.Night OVRD (Night  Override)[1]
        Porter Hall.A level. A13.NIght OVRD Time( Night Override Time)[0]
        Porter Hall.A level. A13.Reheat End (Reheat End)[100]
        Porter Hall.A level. A13.Reheat Start (Reheat Start)[0]
        Porter Hall.A level. A13.Setpoint DIAL (Setpoint Dial)[1]
        Porter Hall.A level. A13.Valve Command (Valve Command)[1]
        Porter Hall.A level. A13.Valve Count (Valve Count)[0]
        Porter Hall.A level. A13.Valve Position (Valve Position)[0]
        Porter Hall.A level. A13.Wall Switch (Wall Switch)[0]
        Porter Hall.A level. A13.Zone Temp (Zone Temp)[72.75]
        Porter Hall.A level. A13.Zone Temp Offset (Zone Temp Offset)[0]
        Porter Hall.A level. A13.ZOne Temp Setpoint (Zone Temp Setpoint)[73]
        Porter Hall.A level. A13.Zone Temp Setpoint Max (Zone Temp Setpoint max)[90]
        Porter Hall.A level. A13.Zone Temp Setpoint Min (ZOne Temp Setpoint min)[55]

        sensors in A15
        Porter Hall. A level. A15.Airflow (Airflow sensor) [404]
        Porter Hall. A level. A15.CLG Flow Max (Cooling flow maximum value) [740]
        Porter Hall. A level. A.15CLG Flow Min (Cooling flow minimum value) [ 400]
        Porter Hall.A level. A15.Control Setpoint (Control Setpoint) [74.25]
        Porter Hall. A level.A15.Control Temperature (Control Temperature)[74.75]
        Porter Hall. A level. A15. Damper Command (Damper Command) [40.4]
        Porter Hall. A level. A15. Damper Status (Damper Status) [0]
        Porter Hall. A level. A15. Day CLG Setpoint (Day cooling Set point)[74]
        Porter Hall. A level. A15. Day HTG Setpoint (Day Heating Set point)[70]
        Porter Hall. A level. A15. Day.Night (Day/Night Value)[0]
        Porter Hall. A level. A15. DI OVRD SW (Status of the override switch at the room temp sensor) [0]
        Porter Hall.A level. A15.Discharge Temp (Discharge Temp) [75]
        Porter Hall.A level. A15.Duct Area (Duct Area) [0.55]
        Porter Hall.A level. A15.Error Status (Error Status) [0]
        Porter Hall.A level. A15.Flow (Flow) [101]
        Porter Hall.A level. A15. Flow Coeff (Flow Coefficient) [0.65]
        Porter Hall.A level. A15. Flow End (Flow End) [0]
        Porter Hall.A level. A15.Flow Setpoint (Flow Setpoint) [100]
        Porter Hall.A level. A15.Flow Start (Flow Start)[0]
        Porter Hall.A level. A15.Heat. Cool [1]
        Porter Hall.A level. A15.HTG Flow Max (Heating Flow Max) [400]
        Porter Hall.A level. A15. HTG Flow Min (Heating Flow Min) [400]
        Porter Hall.A level. A15.MTR Setup (Motor Setup) [5]
        Porter Hall.A level. A15.MTR2 Timing (Motor 2 Timing)[130]
        Porter Hall.A level. A15.Night CLG Setpoint (Night Cooling Set point)[82]
        Porter Hall.A level. A15.NIght HTG Setpoint (Night Heating Set point)[65]
        Porter Hall.A level. A15.Night OVRD (Night  Override)[1]
        Porter Hall.A level. A15.NIght OVRD Time( Night Override Time)[0]
        Porter Hall.A level. A15.Reheat End (Reheat End)[100]
        Porter Hall.A level. A15.Reheat Start (Reheat Start)[0]
        Porter Hall.A level. A15.Setpoint DIAL (Setpoint Dial)[1]
        Porter Hall.A level. A15.Valve Command (Valve Command)[0]
        Porter Hall.A level. A15.Valve Count (Valve Count)[1]
        Porter Hall.A level. A15.Valve Position (Valve Position)[0]
        Porter Hall.A level. A15.Wall Switch (Wall Switch)[0]
        Porter Hall.A level. A15.Zone Temp (Zone Temp)[74.25]
        Porter Hall.A level. A15.Zone Temp Offset (Zone Temp Offset)[0]
        Porter Hall.A level. A15.ZOne Temp Setpoint (Zone Temp Setpoint)[74.25]
        Porter Hall.A level. A15.Zone Temp Setpoint Max (Zone Temp Setpoint max)[90]
        Porter Hall.A level. A15.Zone Temp Setpoint Min (ZOne Temp Setpoint min)[55]


        sensors in A17

        Porter Hall.A level. A17.Airflow (Airflow sensor) [452]
        Porter Hall.A level. A17.CLG Flow Max (Cooling flow maximum value) [452]
        Porter Hall.A level. A.17.CLG Flow Min (Cooling flow minimum value) [ 452]
        Porter Hall.A level. A17.Control Setpoint (Control Setpoint) [73]
        Porter Hall.A level.A17.Control Temperature (Control Temperature)[72.75]
        Porter Hall.A level. A17. Damper Command (Damper Command) [53.2]
        Porter Hall.A level. A17. Damper Status (Damper Status) [0]
        Porter Hall.A level. A17. Day CLG Setpoint (Day cooling Set point)[74]
        Porter Hall.A level. A17. Day HTG Setpoint (Day Heating Set point)[70]
        Porter Hall.A level. A17. Day.Night (Day/Night Value)[0]
        Porter Hall.A level. A17. DI OVRD SW (Status of the override switch at the room temp sensor) [0]
        Porter Hall.A level. A17.Discharge Temp (Discharge Temp) [71]
        Porter Hall.A level. A17.Duct Area (Duct Area) [0.375]
        Porter Hall.A level. A17.Error Status (Error Status) [0]
        Porter Hall.A level. A17.Flow (Flow) [100]
        Porter Hall.A level. A17. Flow Coeff (Flow Coefficient) [0.54]
        Porter Hall.A level. A17. Flow End (Flow End) [0]
        Porter Hall.A level. A17.Flow Setpoint (Flow Setpoint) [100]
        Porter Hall.A level. A17.Flow Start (Flow Start)[0]
        Porter Hall.A level. A17.Heat. Cool [1]
        Porter Hall.A level. A17.HTG Flow Max (Heating Flow Max) [452]
        Porter Hall.A level. A17. HTG Flow Min (Heating Flow Min) [452]
        Porter Hall.A level. A17.MTR Setup (Motor Setup) [13]
        Porter Hall.A level. A17.MTR2 Timing (Motor 2 Timing)[130]
        Porter Hall.A level. A17.Night CLG Setpoint (Night Cooling Set point)[82]
        Porter Hall.A level. A17.NIght HTG Setpoint (Night Heating Set point)[65]
        Porter Hall.A level. A17.Night OVRD (Night  Override)[1]
        Porter Hall.A level. A17.NIght OVRD Time( Night Override Time)[0]
        Porter Hall.A level. A17.Reheat End (Reheat End)[100]
        Porter Hall.A level. A17.Reheat Start (Reheat Start)[0]
        Porter Hall.A level. A17.Setpoint DIAL (Setpoint Dial)[1]
        Porter Hall.A level. A17.Valve Command (Valve Command)[0]
        Porter Hall.A level. A17.Valve Count (Valve Count)[1]
        Porter Hall.A level. A17.Valve Position (Valve Position)[0]
        Porter Hall.A level. A17.Wall Switch (Wall Switch)[0]
        Porter Hall.A level. A17.Zone Temp (Zone Temp)[72.75]
        Porter Hall.A level. A17.Zone Temp Offset (Zone Temp Offset)[0]
        Porter Hall.A level. A17.ZOne Temp Setpoint (Zone Temp Setpoint)[73]
        Porter Hall.A level. A17.Zone Temp Setpoint Max (Zone Temp Setpoint max)[90]
        Porter Hall.A level. A17.Zone Temp Setpoint Min (Zone Temp Setpoint min)[55]



        There is some bacnet stuff in A17/15 like follows but I dont know if they are meaningful
        BACnet_PORTERPXCM01_PH.AHU.RMA17D..VAV.HWF (Variable Air Volume Hot water supply flow ) [5.97]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D..VAV.HWF.2 (Variable Air Volume Hot water supply flow ) [5.1050]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D..VAV.HWF.PRESENT VALUE (Variable Air Volume Hot water supply flow Present Value ) [5.0825]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D.CCV (Chilled Water Valve Signal)[7.43]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D.CCV.2(Chilled Water Valve Signal)[3.55]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D.CCV.PRESENT VALUE (Chilled Water Valve Signal)[7.488]

        BACnet_PORTERPXCM01_PH.AHU.RMA17D.CC(Chilled Water Valve CMD)[74.52%]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D.CC_.2(Chilled Water Valve CMD)[36.26%]
        BACnet_PORTERPXCM01_PH.AHU.RMA17D.CC_.Present_Value(Chilled Water Valve CMD)[74.52%]


        Wednesday, February 15, 2012

        FLIR IR is working

        All,
        We have rendered two "cool" images using our thermal camera.
        Enjoy,

        Mati and Emre