AnsweredAssumed Answered

Moving Data with Status Included Using Piconfig

Question asked by jamespr Champion on May 25, 2018
Latest reply on May 26, 2018 by Sidh

Hello Team!

 

I would like to know how I can use Piconfig to move PI values from one server to another including the status. For example: I have one tag which is a float point but with some status indicating that the unit was down or bad. In the following example the Digital State was to indicate that a Shutdown.

 

sinusoid,24-May-18 17:06:44,72.41431,GOOD

sinusoid,24-May-18 17:25:14,64.93854,GOOD

sinusoid,24-May-18 17:26:30,Digital State,Shutdown

sinusoid,25-May-18 09:23:06,1.012439,GOOD

sinusoid,25-May-18 10:30:36,14.83009,GOOD

 

When I execute a backfill in the dev server, I got the following error:

*> sinusoid,24-May-18 17:25:18,64.93854,GOOD

*> sinusoid,24-May-18 17:26:34,"Digital State",Shutdown

*PIconfig Err> Error in table interface... Rec: <sinusoid>

*[-15013] PIvalue Type or PIstring is Not Float

*> sinusoid,25-May-18 09:23:10,1.012439,GOOD

*> sinusoid,25-May-18 10:30:40,14.83009,GOOD

*> sinusoid,25-May-18 12:52:40,72.1533,GOOD

PIconfig        9  Data lines

                     3  Command line

                     1  Records in error...

 

                8  Records Edited

 

I'm using the following script to get the data:

@tabl piarc

@ostr tag,time,value,status

@ostr ...

@istr tag,starttime,endtime,count

@output values.txt

@echo off

sinusoid,*-1d,*,1000000

@exit

 

And this for the backfill:

@mode edit,t

@table pisnap

@istr tag, time, value, status

sinusoid,24-May-18 17:06:48,72.41431,GOOD

sinusoid,24-May-18 17:25:18,64.93854,GOOD

sinusoid,24-May-18 17:26:34,"Digital State",Shutdown

sinusoid,25-May-18 09:23:10,1.012439,GOOD

sinusoid,25-May-18 10:30:40,14.83009,GOOD

sinusoid,25-May-18 12:52:40,72.1533,GOOD

 

Do I missing a flag? It is possible to copy/move the status of the tag into another server?

Outcomes