YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Moving PI unit batches to different PI units??? Options · View
caffreys_col
#1 Posted : Friday, October 21, 2011 1:52:39 PM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2011
Posts: 40
Location: Grimsby UK
I want to restructure my module database heirarchy to better respresent my plant. How do I move my existing PI units and batches while keeping the batch data?? I have tried moving a pi unit batch under another PI unit batch and it shows ok, but I lose all the batch data (I can't see any batches in Pi batchview).

Help please!!!
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
squatty
#2 Posted : Friday, October 21, 2011 2:35:26 PM
Rank: Advanced Member

Groups: Member

Joined: 4/7/2011
Posts: 137
Location: KZN, South Africa
You are testing us this late on a FridayAngry Tongue

Below you will see the extract from the documentation that you should have as well. I'm not an expert in this field, we never had to move our units, so I will first test this before diving in the deep end.

page 79
PI Batch Generator (PIBaGen) Interface to the PI System

1. If the PIUnit exists, make sure it is not monitored by the interface. (Unregister the PIUnit and check that the interface stopped monitoring the PIUnit.) The alternative is to stop the interface, but it is not necessary.
2. If the PIUnit does not exist, create the PIUnit. On a PI 3.4 server proceed to Step 5.
3. If the PIUnitBatch storage PIPoint for this PIUnit already exists (i.e., if PIUnitBatches were previously added and removed), then proceed to Step 5.
4. Add a PIUnitBatch, using PI MDB Editor, with the start time later than the start time of the primary archive. Using PI MDB editor, delete the just added PIUnitBatch. This step will create the necessary PIUnitBatch storage PIPoint. Perform this step when it cannot be determined if the PIUnitBatch storage PIPoint exists.
5. Repeat steps 1 to 4 for all the PIUnits that need to be backfilled.
6. A PIBatch storage PIPoint is added when the first PIBatch is added to the PI Batch Database. If there was no PIBatch ever added to the PIBatch Database, then using PI MDB Editor, add and remove a PIBatch that has the start time later than the start time of the primary archive. This step will create the necessary PIBatch storage PIPoint. Perform this step when it cannot be determined if the PIBatch storage PIPoint exists.
7. Reprocess the archives to create primary records for the newly added storage PIPoints. All the archives that cover the time span for backfilling batch data need to be reprocessed. See PI Server System Management Guide for details on reprocessing archives.
8. Open the the Batch Generator Plug-in for PI SMT. Select the PIUnit of interest and set the Recovery Option to either Recover all PIBatch Objects or Recover only PIBatches and PIUnitBatches. Also, the Recovery Time should be set to a value that covers the entire recovery period for that PIUnit. Save the changes to the configuration.
9. Register the PIUnit.
10. Repeat steps 8 and 9 for all the PIUnits that need to be backfilled.
11. Start the interface if it is not already running.
caffreys_col
#3 Posted : Tuesday, October 25, 2011 1:43:13 PM
Rank: Advanced Member
Groups: Member

Joined: 4/6/2011
Posts: 40
Location: Grimsby UK
Thanks for that Squatty, but it seems a little extreme to me. I have finally succumbed and asked OSI tech support, and they said something similar to you until they started having a play. They found that if you copy/paste a PI Unit in module database editor then it creates a new GUID number. The new GUID number is different to the one which created the original batches, therefore you "lose" all your batches.

To get round this;
1. Unregister the PI Unit you want to move.
2. right click the unit and select cut
3. highlight the unit under which you want to move the cut unit
4. right click and select "paste hierarchy"
5. Register the PI unit again.

It works because cut/paste doesn't change the GUID, therefore all the batches remain. ThumbsUp

I better mention, that the above is for moving PI units around in module database editor, not for creating new PI Units with new PI batches, and then backfilling. To do that you have to use the method suggested by Squatty (although I found it confusing exactly what I had to do, when reading the instructions). ThumbDown

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.