Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PdServ integration #64

Open
igh-ab opened this issue Jul 31, 2023 · 6 comments
Open

PdServ integration #64

igh-ab opened this issue Jul 31, 2023 · 6 comments

Comments

@igh-ab
Copy link

igh-ab commented Jul 31, 2023

Hello Roberto,

I am member of the EtherLab team (etherlab.org) and the creator of the EtherCos package (Scicos, EtherLab, EtherCAT) many years ago.

I am quite happy to see your new project.

I have started a new fork

https://github.com/igh-ab/pysimCoder/tree/master

to test several pysimcoder extension

  • Integration of pdserv library, to use of GUI testmanager, DLS data logging system, and pdcom and qt-pdwidgets library
  • Extend the code generation without using a precompiled library, code generation generates one single C file with all needed code included. This will simplify compilation and cross compilation.
  • Extend the codegeneration to be able to use non function based blocks, like fieldbus IO-systems. Try to port the Matlab TLC methods to the code generation. Blocks add code to includes, linked libraries, CFlags, predefinition, function, prerun, run and postrun sections. Example implemenation sineBlk, constBlk, mxmultBlk, NullBlk.
  • Extend codegeneration by derivated classes of RCPblk, to be able to handle families of blocks.
  • Integration of first EtherCat blocks

Please feel free to comment or discuss my ideas.

Best regards

Andreas

@robertobucher
Copy link
Owner

robertobucher commented Jul 31, 2023 via email

@robertobucher
Copy link
Owner

robertobucher commented Jul 31, 2023 via email

@robertobucher
Copy link
Owner

robertobucher commented Aug 16, 2023

Hi Andreas

I've put "syspath" and "ident" in blocks and subsblock and it seems to work. This is a very good improvement!

Before commit the changes, I'll do some tests to see if nothing else is affected by this modification.

Till now, I let my "old" code in scene.py for code generation and I've not inserted these 3 modified lines in the code:

    fn.write('')
    fn.write('codedata = genCode(fname, ' + self.Ts + ', blks)\n')
    fn.write("genMake(fname, '" + self.template + "', codedata, addObj = '" + self.addO

I've tried your "codedata", but I have some problems with the LTI (G(s) block that gives some errors by the code generation (I'll investigate why).

@igh-ab
Copy link
Author

igh-ab commented Aug 18, 2023

Hello Roberto,
Sorry for the late response, back to work.

Generally it is possible that the codegenerator needs some more codeentrypoints.
Especially for subsampling and internal state update.

I am also thinking, howto extend the RCPblk class (S-Function like interface):

  • Init Parameter function by this class
  • Validate function
  • Multi dimsional parameter or structs (we are in python). Actually the parameter interface reflects only the C-API, but there is no need to.
  • GUI Logic function
  • Block GUI file loading
    ....

In general speaking, only one file per block is responsible for

  • GUI behavior
  • Parameter handling
  • Codegeneration

Best regards

Andreas

@Harshitahusts
Copy link
Contributor

I would like to contribute to this issue I have read the Readme.file for so. Can I?

@robertobucher
Copy link
Owner

Yes, of course you can!

This will give a great improvement to the tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants