Saturday 15 December 2018

Part 2. Create Condition Monitoring and Enter Meter Reading Values Using Rest API | IBM Maximo

In the previous post, we created meters and attached meters to asset. Today we will create condition monitoring record and enter meter values using Rest Api.

1. First step is to create object structure MX-MEASUREPOINT1. Add MEASUREPOINT object to it and add a child object of CHARPOINTACTION.
Object Location Path: MEASUREPOINT/CHARPOINTACTION
Relation: CHARPOINTACTION.

2. Create a new HTML file and paste a following code:
<html>
<body>
<form name="input" action="http://maxhostname:9080/maxrest/rest/os/MX-MEASUREPOINT1?_lid=wilson&_lpwd=wilson" method="POST">
    POINTNUM      <input name="POINTNUM" value="1111" type="text"> <p/>
    ASSETNUM                <input name="ASSETNUM" value="11245" type="text"> <p/>
    SITEID          <input name="SITEID" value="BEDFORD" type="text"> <p/>
    DESCRIPTION          <input name="DESCRIPTION" value="Vibration check" type="text"> <p/>
    MEASUREPOINTID     <input name="MEASUREPOINTID" value="" type="number"> <p/>
    METERNAME             <input name="METERNAME" value="VIBRATION1" type="text"> <p/>
    CHARPOINTACTIONID       <input name="CHARPOINTACTION.ID1.CHARPOINTACTIONID" value="" type="number"> <p/>
    VALUE <input name="CHARPOINTACTION.ID1.VALUE" value="High" type="text"> <p/>
    JPNUM      <input name="CHARPOINTACTION.ID1.JPNUM" value="JP-111" type="text"> <p/>
    PRIORITY <input name="CHARPOINTACTION.ID1.PRIORITY" value="" type="text"> <p/>
<input type="submit" value="Submit">
</form>
</body>



3. Run the HTML File and Click Submit. Condition monitoring record will be created in Maximo.

4. Next Step is to Create Meter Reading record using Rest Api.

5. In Object Structure MXASSET, Add a new Child Object MEASUREMENT.
Parent: ASSETMETER
Object Location Path: ASSET/ASSETMETER/MEASUREMENT
Relationship: MEASUREMENT

6. Create a new HTML file and paste a following code:
 <html>
<body>
<form name="input" action="http://maxhostname:9080/maxrest/rest/os/mxasset/1120?_action=AddChange&_lid=maxadmin&_lpwd=maxadmin" method="POST">
    LINEARASSETMETERID   <input name="ASSETMETER.ID1.LINEARASSETMETERID" value="0" type="text"> <p/>
    METERNAME                <input name="ASSETMETER.ID1.METERNAME" value="VIBRATION1" type="text"> <p/>
    OBSERVATION      <input name="ASSETMETER.ID1.MEASUREMENT.ID1.OBSERVATION" value="High" type="text"> <p/>
    INSPECTOR                <input name="ASSETMETER.ID1.MEASUREMENT.ID1.INSPECTOR" value="WILSON" type="text"> <p/>
    POINTNUM                <input name="ASSETMETER.ID1.MEASUREMENT.ID1.POINTNUM" value="1111" type="text"> <p/>
    <input type="submit" value="Submit">
</form>
</body>
<html>
7. Run the HTML File and Click Submit. Meter Reading record will be created in Maximo.
Work order will generated automatically if the measure point WO Generation Crontask is active.












3 comments: