[Beremiz-devel] create a plugin with a CustomTable

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list

Hello,

 

I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.

I based my development on Modbus plugin from Mario.

 

My idea is to create a UserParam node, and display a Custom table where the user can add and remove variables. After this C code will be generated to create a C struct.

 

I am looking for a way to display my CustomTable  in the view of the plugin node. I have modified the editor\DataTypeEditor.py file to create a view of the result I want, please see screenshot in attach.

 

In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .

Have you an idea to help me?

 

Thank you very much

 

Best reagrds,

Fabien.

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

beremiz_UserParam.PNG (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list
Hi Fabien,

On 17-10-11 16:19, [hidden email] wrote:
> Hello,
>
> I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.
> I based my development on Modbus plugin from Mario.
>
> My idea is to create a UserParam node, and display a Custom table
> where the user can add and remove variables. After this C code will
> be generated to create a C struct.
Why do you need that?
If number, type and names of variables are defined by user,
have you considered to just use Global or Config variables in the
project? C code will be generated for them already.

> I am looking for a way to display my CustomTable  in the view of the
> plugin node. I have modified the editor\DataTypeEditor.py file to
> create a view of the result I want, please see screenshot in attach.

> In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .
> Have you an idea to help me?
Do you want to have something like py_ext or c_ext extensions, but
without code editor?

--
Best regards,
Andrey Skvortsov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list
In reply to this post by Beremiz-Devel mailing list
Hi Fabien,

On 17-10-11 16:19, [hidden email] wrote:
> Hello,
>
> I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.
> I based my development on Modbus plugin from Mario.
>
> My idea is to create a UserParam node, and display a Custom table
> where the user can add and remove variables. After this C code will
> be generated to create a C struct.
Why do you need that?
If number, type and names of variables are defined by user,
have you considered to just use Global or Config variables in the
project? C code will be generated for them already.

> I am looking for a way to display my CustomTable  in the view of the
> plugin node. I have modified the editor\DataTypeEditor.py file to
> create a view of the result I want, please see screenshot in attach.

> In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .
> Have you an idea to help me?
Do you want to have something like py_ext or c_ext extensions, but
without code editor?


--
Best regards,
Andrey Skvortsov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list
In reply to this post by Beremiz-Devel mailing list

Hello Fabien,

You can add your custom table in node, using custom node editor like in C or Python extensions.

Override VariablesEditor class from CodeFileEditor module, add features on your own, and specify this class as EditorType in your node. But there is a problem that it's impossible to define data in XSD. So, you can store variables from this extension in XML, or as you wish.

11.10.2017 19:19, [hidden email] пишет:

Hello,

 

I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.

I based my development on Modbus plugin from Mario.

 

My idea is to create a UserParam node, and display a Custom table where the user can add and remove variables. After this C code will be generated to create a C struct.

 

I am looking for a way to display my CustomTable  in the view of the plugin node. I have modified the editor\DataTypeEditor.py file to create a view of the result I want, please see screenshot in attach.

 

In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .

Have you an idea to help me?

 

Thank you very much

 

Best reagrds,

Fabien.

 

 

 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

--
Best regards, Sergey Surkov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list

Sorry, there is a bit easier way to do this. You can modify CODEFILE_XSD schema in CodeFileTreeNode and CodeFile class, add features you want, and all of this will eventually come to creating your own Editor class that will be used in node.


12.10.2017 13:21, [hidden email] пишет:

Hello Fabien,

You can add your custom table in node, using custom node editor like in C or Python extensions.

Override VariablesEditor class from CodeFileEditor module, add features on your own, and specify this class as EditorType in your node. But there is a problem that it's impossible to define data in XSD. So, you can store variables from this extension in XML, or as you wish.

11.10.2017 19:19, [hidden email] пишет:

Hello,

 

I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.

I based my development on Modbus plugin from Mario.

 

My idea is to create a UserParam node, and display a Custom table where the user can add and remove variables. After this C code will be generated to create a C struct.

 

I am looking for a way to display my CustomTable  in the view of the plugin node. I have modified the editor\DataTypeEditor.py file to create a view of the result I want, please see screenshot in attach.

 

In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .

Have you an idea to help me?

 

Thank you very much

 

Best reagrds,

Fabien.

 

 

 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

--
Best regards, Sergey Surkov


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

--
Best regards, Sergey Surkov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list

Hi Andrey and Sergey,

 

Thank you both for your answers.

 

I don’t want to use Global and Config variable, because I want to add custom flags and restrictions for variable in this list and to make an access more friendly.

Finally, my goal is to allocate a parameter table physically located in the firmware memory, but  the content of this table is defined by PLC. As a result, even if PLC is modified, the parameter table keep its structure. Another need is to display and modify the content of this table on a screen directly by the target firmware instead of using PLC, so it will simplify and reduce a lot the code size of the generated PLC.

 

I have followed your advice to have a look at py_ext and c_ext, and you are right, it is the good starting point for my plugin. I’ve just written a custom Editor based on CodeFileEditor and it is exactly what I need.

 

Thanks a lot for your help, I keep you in touch about my progress,

 

Have a nice day,

Regards,

Fabien.

 

 

De : [hidden email] [mailto:[hidden email]]
Envoyé : jeudi 12 octobre 2017 13:04
À : [hidden email]
Objet : Re: [Beremiz-devel] create a plugin with a CustomTable

 

Sorry, there is a bit easier way to do this. You can modify CODEFILE_XSD schema in CodeFileTreeNode and CodeFile class, add features you want, and all of this will eventually come to creating your own Editor class that will be used in node.

 

12.10.2017 13:21, [hidden email] пишет:

Hello Fabien,

You can add your custom table in node, using custom node editor like in C or Python extensions.

Override VariablesEditor class from CodeFileEditor module, add features on your own, and specify this class as EditorType in your node. But there is a problem that it's impossible to define data in XSD. So, you can store variables from this extension in XML, or as you wish.


11.10.2017 19:19, [hidden email] пишет:

Hello,

 

I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.

I based my development on Modbus plugin from Mario.

 

My idea is to create a UserParam node, and display a Custom table where the user can add and remove variables. After this C code will be generated to create a C struct.

 

I am looking for a way to display my CustomTable  in the view of the plugin node. I have modified the editor\DataTypeEditor.py file to create a view of the result I want, please see screenshot in attach.

 

In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .

Have you an idea to help me?

 

Thank you very much

 

Best reagrds,

Fabien.

 

 

 




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 

--
Best regards, Sergey Surkov




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 

--
Best regards, Sergey Surkov


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list
Hello, Fabien

I made custom table for my modbus master. May be it will be useful :


Vasilij

2017-10-12 17:24 GMT+05:00 <[hidden email]>:

Hi Andrey and Sergey,

 

Thank you both for your answers.

 

I don’t want to use Global and Config variable, because I want to add custom flags and restrictions for variable in this list and to make an access more friendly.

Finally, my goal is to allocate a parameter table physically located in the firmware memory, but  the content of this table is defined by PLC. As a result, even if PLC is modified, the parameter table keep its structure. Another need is to display and modify the content of this table on a screen directly by the target firmware instead of using PLC, so it will simplify and reduce a lot the code size of the generated PLC.

 

I have followed your advice to have a look at py_ext and c_ext, and you are right, it is the good starting point for my plugin. I’ve just written a custom Editor based on CodeFileEditor and it is exactly what I need.

 

Thanks a lot for your help, I keep you in touch about my progress,

 

Have a nice day,

Regards,

Fabien.

 

 

De : [hidden email] [mailto:[hidden email]]
Envoyé : jeudi 12 octobre 2017 13:04
À : [hidden email]
Objet : Re: [Beremiz-devel] create a plugin with a CustomTable

 

Sorry, there is a bit easier way to do this. You can modify CODEFILE_XSD schema in CodeFileTreeNode and CodeFile class, add features you want, and all of this will eventually come to creating your own Editor class that will be used in node.

 

12.10.2017 13:21, [hidden email] пишет:

Hello Fabien,

You can add your custom table in node, using custom node editor like in C or Python extensions.

Override VariablesEditor class from CodeFileEditor module, add features on your own, and specify this class as EditorType in your node. But there is a problem that it's impossible to define data in XSD. So, you can store variables from this extension in XML, or as you wish.


11.10.2017 19:19, [hidden email] пишет:

Hello,

 

I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.

I based my development on Modbus plugin from Mario.

 

My idea is to create a UserParam node, and display a Custom table where the user can add and remove variables. After this C code will be generated to create a C struct.

 

I am looking for a way to display my CustomTable  in the view of the plugin node. I have modified the editor\DataTypeEditor.py file to create a view of the result I want, please see screenshot in attach.

 

In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .

Have you an idea to help me?

 

Thank you very much

 

Best reagrds,

Fabien.

 

 

 




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 

--
Best regards, Sergey Surkov




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 

--
Best regards, Sergey Surkov


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] create a plugin with a CustomTable

Beremiz-Devel mailing list

Hello Vasilij,

 

Thank you for you link, your module seem pretty good, it will help me too,

Thank you

Fabien.

 

De : [hidden email] [mailto:[hidden email]]
Envoyé : jeudi 12 octobre 2017 17:44
À : [hidden email]
Objet : Re: [Beremiz-devel] create a plugin with a CustomTable

 

Hello, Fabien

 

I made custom table for my modbus master. May be it will be useful :

 

 

Vasilij

 

2017-10-12 17:24 GMT+05:00 <[hidden email]>:

Hi Andrey and Sergey,

 

Thank you both for your answers.

 

I don’t want to use Global and Config variable, because I want to add custom flags and restrictions for variable in this list and to make an access more friendly.

Finally, my goal is to allocate a parameter table physically located in the firmware memory, but  the content of this table is defined by PLC. As a result, even if PLC is modified, the parameter table keep its structure. Another need is to display and modify the content of this table on a screen directly by the target firmware instead of using PLC, so it will simplify and reduce a lot the code size of the generated PLC.

 

I have followed your advice to have a look at py_ext and c_ext, and you are right, it is the good starting point for my plugin. I’ve just written a custom Editor based on CodeFileEditor and it is exactly what I need.

 

Thanks a lot for your help, I keep you in touch about my progress,

 

Have a nice day,

Regards,

Fabien.

 

 

De : [hidden email] [mailto:[hidden email]]
Envoyé : jeudi 12 octobre 2017 13:04
À : [hidden email]
Objet : Re: [Beremiz-devel] create a plugin with a CustomTable

 

Sorry, there is a bit easier way to do this. You can modify CODEFILE_XSD schema in CodeFileTreeNode and CodeFile class, add features you want, and all of this will eventually come to creating your own Editor class that will be used in node.

 

12.10.2017 13:21, [hidden email] пишет:

Hello Fabien,

You can add your custom table in node, using custom node editor like in C or Python extensions.

Override VariablesEditor class from CodeFileEditor module, add features on your own, and specify this class as EditorType in your node. But there is a problem that it's impossible to define data in XSD. So, you can store variables from this extension in XML, or as you wish.


11.10.2017 19:19, [hidden email] пишет:

Hello,

 

I am working on writing a Beremiz plugin to link user parameter located outside the PLC with the PLC.

I based my development on Modbus plugin from Mario.

 

My idea is to create a UserParam node, and display a Custom table where the user can add and remove variables. After this C code will be generated to create a C struct.

 

I am looking for a way to display my CustomTable  in the view of the plugin node. I have modified the editor\DataTypeEditor.py file to create a view of the result I want, please see screenshot in attach.

 

In the Modbus plugin, displayed data are defined in XSD  template, but I can find a way to add my view .

Have you an idea to help me?

 

Thank you very much

 

Best reagrds,

Fabien.

 

 

 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 

--
Best regards, Sergey Surkov



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 

--
Best regards, Sergey Surkov


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel