MER Tools

Tim Ganz

Member
Join Date
Dec 2010
Location
Dallas, Texas
Posts
674
Can someone help me understand how to install and use the mer tools in the link below? I found this by a forum link but I can't figure out how to use it as I have no experience with setting up and using python and it looks to me like that's what is needed.

Does anyone know if there is a video or other resource on how to use this tool?

I have a mer file that's protected and I need to make an edit and new apa.

https://github.com/dmroeder/mer_tools
 
This tool does not bypass file protection, unless I am mistaken.
If it's [password] protected then you have limited options. Contacting the equipment manufacturer is a good start. If that's not possible then TechConnect can help in 'some' instances.
This tool will work if you need to restore a project prior to version 7.
 
Last edited:
Tim,

do you have the panelbuilder software?
if you do, then you already have the tools to convert the mer file to an application. As stated, if there is a password required, then you need to contact the oem.
james
 
I assume you have python installed, it is easiest you have added python to the PATH environment variable. That way you can execute python scripts from anywhere from the command line. You can test this by opening the command prompt and typing "python". When you hit enter, it should switch to the python interpreter. To exit the interpreter, type "exit()".

Download the code from the repo, extract it. From the directory that has the setup.py, hold SHIFT and right click the white space, open powershell here. type "python setup.py install --user.

Assuming that is all successful, create a new python file and try the example from the repo. You can run the file by ether right clicking it and opening it with IDLE (F5), or from the command prompt/powershell: python my_file.py
 
I got this when I tried to enable_restore()
Looks like a "rights" issue. I'm sure I’m doing something wrong. First day ever touching Python. lol
I have (2) projects that were done with the "never allow Conversion" by accident.


Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from mer_tools import mer
>>> x = mer("StokerPV.mer")
>>>
>>> audit = x.audit()
>>> print(audit)
['StokerPV', 'v6.0', 'FactoryTalk View Studio ME', (1, 'Never allow conversion')]
>>> from mer_tools import mer
>>> x = mer("StokerPV.mer")
>>> x.enable_restore()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\xxxxxxxxxxx\Downloads\mer_tools-master\mer_tools-master\mer_tools\mertools.py", line 146, in enable_restore
with olefile.OleFileIO(self.file, write_mode=True) as ole:
File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\olefile\olefile.py", line 1075, in __init__
self.open(filename, write_mode=write_mode)
File "C:\Users\xxxxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\olefile\olefile.py", line 1169, in open
self.fp = open(filename, mode)
PermissionError: [Errno 13] Permission denied: 'StokerPV.mer'
>>>
 
Looks like you have a good ol' fashion permission problem. Windows and python are kind of a mess when it comes to permissions. I'd probably start by installing python for "All users".
 
Looks like you have a good ol' fashion permission problem. Windows and python are kind of a mess when it comes to permissions. I'd probably start by installing python for "All users".

Thanks for the reply, I got it to work by installing python for all users.
Life saver.
I had 2 programs in 1 week with the "Never allow conversion" check box. You saved me a lot of work.
Earlier last week I tried to unpack the .mer and replace the File Protection file with one that didn't have File protection but was unsuccessful. The size seem to be wrong and it would never work.

Thanks for doing this.
 

Similar Topics

Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
82
Hello, I have a CNG compressor that is run by a PLC. I tried to get team viewer on it to be able to view it remotely, I accidently disabled the...
Replies
0
Views
96
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
216
Question to anyone with ideas about my thoughts on upgrading a very vintage timer, which is being used to switch between 2 5hp domestic water...
Replies
14
Views
364
I need a good website or tutorial to learn plc programming Thank you
Replies
10
Views
461
Back
Top Bottom