Welcome, Guest
Username: Password: Remember me

TOPIC: Compile from source with new classes

Compile from source with new classes 9 years 1 month ago #7868

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Dear Claes.

I would like to build from sources a new release of proview appended with my own new plc classes, function object with c code, components, etc.
What is the process to export from a project to the proview sources before rebuilding ?
What is then the process to make an executable 64 bytes installation ubuntu debian package ?
As well, I will send you the source of the new realise or the new classes if you are interested. (process simulation and advanced controllers)

:cheer:

/Bruno
The administrator has disabled public write access.

Compile from source with new classes 9 years 1 month ago #7877

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3228
  • Thank you received: 518
  • Karma: 134
Hi Bruno,

I'm looking forward to see your new classes and maybe som more info about what they do.
I've written down some steps on how to add the classes and I'm sure I have forgotten something but I expect you to be back with some questions.

You can insert the objects in an existing class volume, but I think the easiest is to keep your class volume as it is and insert it into some existing module, for example the misc module. It's also possible to create a separate module but this descripion is for an existing module. It's not so hard to move to to a separate module later if that's more suitable.

Here is an example of how insert a class volume with c and h-files in the misc module.

Copy the misc/wbl/misc directory tree, and replace the miscelaneous.wb_load with the wb_load file for your class volume. Let say your class volume is named control.

> pwre module misc
> cd $pwre_sroot/wbl
> cp -r misc control
> cd control/src
> rm *.wb_load
> rm *.flw
> cp ...your project somewhere/src/db/control.wb_load .

Open control.wb_load with a text editor and replace the volume identity on the first row with next base volume id (0.0.0.11). If you want to change the volume name, replace also all occurencies of this in the file and in the name of the file.

If you want to open the class editor, this can be opened with (from the misc/wbl/control/src directory)
> wblstart.sh control.wb_load

The volume should not be built in the class editor.

Build the class volume (dbs-file, h-file and doc)

> pwre build wbl control src lib
> pwre build wbl control src copy
> pwre build wbl control src exe
> pwre merge

This will create control.dbs on $pwr_load and pwr_controlclasses.h on $pwr_inc.

Normally when you create a new source directoryies you have to execute 'pwre configure' to create som build files, but these will follow with the copying here.

Create an archive for the c-files in the same way by copying misc/lib/misc to misc/lib/control. Replace the misc files on misc/lib/control/src with your c and h-files. They should begin with control otherwise they are not detected by the build script. Build with

> pwre module misc
> pwre build lib control
> pwre merge

This will create libpwr_control.a on $pwr_lib.

Edit src/exp/rt/src/pwr_volumelist.dat and add the control volume with volume id. Build with
> pwre module
> pwre build exp rt src
> pwre merge

Edit wb/exp/wb/src/pwr_wb_palette.cnf to add the volume to the configurator and the plc palettes. Add the control volume under AllClasses and the plc function object under PlcEditorPalette. Build with
> pwre module wb
> pwre build exp wb src
> pwre merge

To create the installation packages, edit src/tools/pkg/ubu_x86_64/pwr/control and change the version number. Do the same for pwrrt/control, pwrsev/control and pwrdemo/control.

Build the packages with
> pwre module
> pwre build tools/pkg ubu_x86_64

The build of the pwrdemo package will fail but hopefully the other packages are created on $pwre_broot/os_linux/hw_x86_64/build/pkg.

To avoid the pwrdemo build you can create an empty file $pwre_broot/os_linux/hw_x86_64/bld/pkg/ubu_x86_64/control_pwrdemo.

When you build a project, you have to create a BuildOptions object under the NodeConfig object and add the pwr_control archive.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: AutoMate

Compile from source with new classes 8 years 11 months ago #8003

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Dear Claes.

I'm not quite ready to compile from source but my project to build a brand new internal model controller as an alternative to the PID is soon ready.

I have just one or two questions.
How to make the scantime button work as in the PID one ? (there is something with local. variable)

/Bruno
Attachments:
Last Edit: 8 years 11 months ago by brunad.
The administrator has disabled public write access.

Compile from source with new classes 8 years 11 months ago #8004

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3228
  • Thank you received: 518
  • Karma: 134
Hi Bruno,

Previously there was a number of functions in the object graphs that couldn't be programmed with the dynamics in Ge, but had to be done with some c-code. Most of these functions are now implemented as dynamics, and I think the last remaining function that still has to be programmed in c-code is the scantime for trends. I am thinking of adding a ScantimeAttribute to the trend dynamics, but it hasn't been done yet. Until then some code has to be added in xtt/lib/ge/src/ge_graph_object.cpp for these classes.

/Claes
The administrator has disabled public write access.

Compile from source with new classes 8 years 9 months ago #8136

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hello Claes.

If you got some time, take a look at this demo project on internal model controller for proview. The new classes are in alpha/beta mode.
If you think it's interesting :woohoo: , feel free to append it to Proview.

Starting doc:

File Attachment:

File Name: CompIMC_doc.pdf
File Size: 807 KB


Link to download the demo project:

IMC Demo project

/Bruno
The administrator has disabled public write access.

Compile from source with new classes 8 years 9 months ago #8153

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3228
  • Thank you received: 518
  • Karma: 134
Hi Bruno,

I've started the demo project and played around a bit, and it looks great. I will add it to the next release. Thanks a lot!

I just want to make some minor changes, for example change the Title attribute do Description. In this way the text will be displayed in the navigator and configurator on the object row. We also use to set the Noedit flag for runtime attributes that shouldn't be edited in the configurator. So maybe you could send me a list of these attributes or I can try to figure it out myself. As you might have seen we have redrawn the object graphs in V5.4 so maybe will will update the graphs to the new layout.

I have had some plans for a simulate volume with classes to create advanced models, and your simulation classes could be a start of this volume. I like the SigGen although I'd like to be able to superpose the noise to the wave signal and maybe add a bias, but that's easy to fix. There already are an ADelay class that looks quite similar to your Delay class, I haven't figured out yet if there is any difference.

/Claes
The administrator has disabled public write access.
Time to create page: 23.974 seconds