Easy Setup of Many Tags?

The web interface and console manager are both very easy to use to setup individual modbus measurements, but I was wondering if there is an easy way to setup a lot of them all at once? A CSV import maybe? I noticed I can import a JSON file, that if I export it first I can see its structure, but it isn’t any faster to type every point in a JSON compared to working in excel.

Maybe a simple converter from CSV to JSON would be useful? Or a way to upload CSV should be rather easy, then convert server side as needed…

I’m looking at the JSON, it seems simple enough each record only has 4 fields. What pops out at me though is it doesn’t have a historian field, so I wonder if I would have to go into the manager and manually set each to PPA?

So using the following:

recordType, address, description, dataValue
2, "483", "MS FLTR BNK VA", ""
2, "484", "MS FLTR BNK VB", ""
2, "485", "MS FLTR BNK VC", ""

Combined with a converter at csvjson.com you can convert and copy / paste relatively easily. I haven’t got the sequence or device level to work yet.

I think the screen automatically assigns the default historian for the “device” - and measurements for the device then automatically get archived. Don’t recall that the screen allows this selection otherwise, but it’s been a while since I’ve looked at it…

historian

By default when I add a measurement this screen has “Historian: Select Historian” in order to get the measurement to log data and show up in the monitoring section of the web interface, I have to manually go in and set this to “Historian: PPA” for each point.

I believe if you set the RTAC-MOD device historian it should auto-assign all assoicated points to the historian. If this is not the case, I need to go home and rethink my life… :wink:

Setting historian to PPA does not auto-assign points. Is there somewhere else to set it so it does?

That’s the one. I will need to do some testing here - but I would expect that to work.

So if I add a point inside of the OH manager it will auto assign historian to PPA. If I add the point through the web interface / JSON upload it will not.

I think we need to fix that :-p

Hi ritchiecarroll,

I know it is a old post but do you have any update about fixing the multiple TAGs set to PPA?

After re-reading this thread, I got a little lost - was the issue that when you create a Modbus mapping the device does not automatically associate with the primary historian?

Not sure about Cesar, but the issue I was having was that there was no easy way to mass add tags. If you formatted and uploaded a JSON via the web interface you would then have to go and manually set each tag’s historian to PPA. This is because setting the default to PPA works for the manager, but does not apply that default to JSON uploads.

I’m not sure if this was fixed, I gave up on it.

Thanks for the replies @ritchiecarroll and @GlorifiedManual!

I did created one .json file for each input sequence and I am able to Load and Apend them to the Modbus configuration map buider. However this step only worked in the “openHistorian Web Manager” and not in the “openHistorian Manager”.

After digging a little, I understood that I need to match the “Device Name” ( when saving a new modbus device connection) with the Historian instance name in order to store the data in the database and see the points in the Trend/Export tool. See the image below:

In my understanding, the correction would be in the Historian selection when you edit the device. In the Devices->Browse Devices, when you edit the with the clicking on the little pen, there is a section where you can select in which Historian you would like to save the data. In my understanding, if you change there, all the Modbus points related to that device will be changed to the new historian, what does not happen.

Let me know If I was clear, I can create a new topic if needed.

Thanks again

Another question that I have is related to the tag name when importing many tags.
In the .json file, I have used the following format:
{
“sequences”: [
{
“type”: 0,
“name”: “1”,
“records”: [
{ “recordType”: 2, “address”: 1, “description”:“Usage”, “dataValue”: “” },
{ “recordType”: 2, “address”: 2, “description”:“Generation”, “dataValue”: “” },
{ “recordType”: 2, “address”: 3, “description”:“Battery”, “dataValue”: “” },
{ “recordType”: 2, “address”: 125, “description”:“SOLAR_VA_C”, “dataValue”: “” }
]
}
]
}

What is the variable that I need to set in order to control the variable type ( int16, int32, float32, …). How can I set the amount of registers that that measurement is taking in the .json?

Also, when checking the little box between the type and the address, I can set to interpret as String:

And how can I set the TAG name format? The default is to have “< DeviceName>-IR1”, IR2, …
Is it possible to change the format the way the tag is writen by default, like < DeviceName>-< Description>?
Is it possible to set the Tag name and the signal type directly in the .json file?

We do have a system that might require to set many tags, so we would like to make easier this process.

Thanks again for all the help with this subject.

Cesar

Sorry about the long posts

No problem - FYI, looking at this for you.

For the moment I think the best we can do for automation of this page without some additional development is to create a JSON file similar to what you see in the “Save Mapping” option - this is the same detail at the bottom of the page in the “Serialized Sequences” section. You can then use “Load Mapping” option and manually manage remaining steps.

However, if you are up for the challenge, you should be able to do some of items you’ve talked about above by adding another local “html” page to the openHistorian to the “wwwroot” folder (typically C:\Program Files\openHistorian\wwwroot\), e.g., CesarModbusAutomate.html. This new html page could then create an IFrame that hosts http://localhost:8180/ModbusConfig.cshtml and uses Javascript to set desired input fields and press buttons - basically creating the automation you are looking for.

Note that changes to files in the wwwroot folder for an installed openHistorian only get updated when the services is restarted - it caches everything as an optimization. Otherwise you can run openHistorian from source with Visual Studio Community in debug mode to make more on-the-fly changes for debugging. FYI, I think you’d have to run the HTML file from the openHistorian (i.e., in same domain) to allow for needed cross-frame scripting - otherwise this kind of thing is typically disallowed for security reasons.

Hope that helps!

Ritchie

FYI - this change fixes issue with saving measurements to PPA:

Any added measurements are now added to the selected historian via a new drop-down top right.

The new build should be ready around 1:00 AM Eastern tomorrow morning after the nightly build runs. After that you can download form here:

https://gridprotectionalliance.org/NightlyBuilds/openHistorian/Beta/openHistorian.Installs.zip

FYI, aince some of the changes were in an associated Javascript file and the browser always caches these, make sure to do a hard reload on the Modbus page once it loads after you install the new version (Ctrl + F5 on most browsers).

Thanks,
Ritchie