@Jan-Reitinger Thank you so much for efficient help. Now it works exactly as I wish.
Posts made by stepan.ozana
-
RE: Overtime info in REXYGEN Diagnostics
-
RE: Exchanging data between tasks
@Jan-Reitinger Thank you so much for efficient help. So far I have used Inport and Outport blocks for working with subsystems. Now I am able to use them to exchange data between tasks.
-
RE: Animation object leaving a trail
@ondrej_severa Thank you so much for efficient help.
-
Overtime info in REXYGEN Diagnostics
Hi, I'd use some explanation on diagnostics related to overtime. Are Aaverage time, Overtime and Max overtime related to basic tick or to the period of the task? I am asking that question because it's not clear to me. Let's suppose I have two tasks, Qtask ("task_speed_loop", tick=2ms) and Level0 ("task" , 5*2ms=10ms). Looking at diagnostics I get overtime. It's caused by customized Python block containing complex operations. This Python block needs appx 5ms to perform all operations. However, the task is launched every 10 ms so it should be computed in time. It seems like the overtime info is related to basic tick 2 ms. Is this correct or am I wrong? Thanks a lot, Stepan.
-
Exchanging data between tasks
Hi, is is possible to exchange data between two tasks connected to Level0 and Level1? Something similar to From and Goto?
-
Animation object leaving a trail
Hi, is there a way how to animate an object in HMI web visualization so that it would leave a trail behind during movement? I'd like to animate a simple path in 2d and to see the current movement and the history path in the form of a trace, maybe represented by a point. For example, 2D moving a rectangle whose center point would leave a trail. Or, as shown in the attachment, animating end points of inverted pendulum's links. Thanks, Stepan
-
HW PWM on RPi?
Hi, is it possible to generate hardware PWM with RPi, using GPIO12 or GPIO13? I see there are flags for these pins in 0120-00_IO_Flags example, but I want to be sure. Thanks, Stepan
-
3D visualization
Hi, is there any example showing step-by-step procedure to create 3D visualization in HMI Designer? According to master's thesis I found on dspace system ("HIL simulator for analysis and demonstration of smart
control algorithms for overhead cranes"), it shoud be possible using Three.js and Solidworks. The thesis says that 3D assembly was converted from Solidworks to Rexygen HMI canvas but it does not contain more details. Would it also be possible to create 3D visualization from Autodesk Inventor? Thanks for support in advance. -
RE: I2C with REXDuino
Me and my colleague finally implemented some functional solution. We make it public if anyone is interested. Many thanks to Ing. Tomáš Dočekal!
MCP4725_REXDuino_2_50_10.zip -
I2C with REXDuino
Hi, is there any example how to use I2C with REXDuino? I followed all accessible documentation and codes both for master part and slave part of REXDuino, and spent a lot of time on a simple task, trying to set CNR value between 0-3.3 [V] , convert it to appropriate format in order to connect it to userSendV input of Arduino_UNO. The goal is to control DAC converter MCP4725 via I2C communication using REXDuino with Arduino Uno to make the converter's output OUT set to desired voltage level according the value written in CNR. Any help appreciated. Stepan
-
RE: Vector output from TRND?
Or, possibly N DEL blocks may also do the job.
-
RE: Vector output from TRND?
I realized that shift register could solve this. For lower number of samples, one or more SHIFTOCT blocks may be used. I will try storing data to buffer via REXLANG for higher number of samples.
-
Vector output from TRND?
Hi, is it possible to obtain the entire vector of values from TRND? I'd like to perform Moving horizon estimation (MHE) algorithm which uses a history of past measurements over some period of time. It is like receeding horizon - each sampling period the data consisiting of N last samples will be used for further processing by REXLANG or PYTHON blocks. First I thought of setting of ptype parameter of TRND to turn its output into vector form but it seems that none of the options match my needs.
-
RE: Python block in 2.50.10 with RPi and external library
@stepan-ozana said in Python block in 2.50.10 with RPi and external library:
Hi, I tested the block PYTHON with 2.50.10 (testing version) and RPi 3b+. Generally it works fine, however I got into troubles when using some externally installed library, particularly pysolnp (https://pypi.org/project/pysolnp/).
Here is the use case and description of what I did:
As the Buster brings both Python 2.7.16 and 3.7.3, I set the default Python3 like this:
Edit nano ~/.bashrc , add alias python='/usr/bin/python3' and alias pip=pip3, then run source ~/.bashrc.
After that, typing python --version, it shows python 3.7.3 as required by PYTHON block in Rexygen.
Then I was able to install pysolnp according official guide: pip install pysolnp.
If I run any script manually (for example the initial basic example on the web https://pypi.org/project/pysolnp/), it works fine. It uses imported pysolnp library and gives the results as expected.
However, if I run it within REXYGEN project, I got error in Rexygen diagnostics saying that 'no module named pysolnp was found'. When I run help('modules') from Python command line, I see pysolnp in the list of modules.
Is it possible that for some reason older Python 2.7.16 is called from Rexygen environment? This would maybe explain the situtation as I didn't import pysolnp here but into 3.7.3. If this is the case, how to fix this to tell Rexygen to call python3 instead of python2? On the other hand, Rexygen would probably show different error regarding version of Python itself, because it needs Python 3.7.x according documentation.
P.S. The same use case under Windows+Rexygen+pysolnp works fine.
Best regards, StepanI made it work. It was an issue with different user accounts. I had the package installed under pi user but it has to be installed under root user. Then it works perfectly.
-
Python block in 2.50.10 with RPi and external library
Hi, I tested the block PYTHON with 2.50.10 (testing version) and RPi 3b+. Generally it works fine, however I got into troubles when using some externally installed library, particularly pysolnp (https://pypi.org/project/pysolnp/).
Here is the use case and description of what I did:
As the Buster brings both Python 2.7.16 and 3.7.3, I set the default Python3 like this:
Edit nano ~/.bashrc , add alias python='/usr/bin/python3' and alias pip=pip3, then run source ~/.bashrc.
After that, typing python --version, it shows python 3.7.3 as required by PYTHON block in Rexygen.
Then I was able to install pysolnp according official guide: pip install pysolnp.
If I run any script manually (for example the initial basic example on the web https://pypi.org/project/pysolnp/), it works fine. It uses imported pysolnp library and gives the results as expected.
However, if I run it within REXYGEN project, I got error in Rexygen diagnostics saying that 'no module named pysolnp was found'. When I run help('modules') from Python command line, I see pysolnp in the list of modules.
Is it possible that for some reason older Python 2.7.16 is called from Rexygen environment? This would maybe explain the situtation as I didn't import pysolnp here but into 3.7.3. If this is the case, how to fix this to tell Rexygen to call python3 instead of python2? On the other hand, Rexygen would probably show different error regarding version of Python itself, because it needs Python 3.7.x according documentation.
P.S. The same use case under Windows+Rexygen+pysolnp works fine.
Best regards, Stepan -
RE: Simulink->FMU->REXYGEN?
You are right, I am sorry for my mistake. According documentation https://www.rexcontrols.cz/media/2.50.5/doc/PDF/CZECH/BRef_CZ.pdf
it seemed it was in basic installation. So it would be appropriate to modify my question: DO you consider embedding FMUCS to MODEL library in future? Thank you Stepan -
Simulink->FMU->REXYGEN?
Hi, it seems like starting from R2019a, Simulink is capable of exporting models into FMU. It should be then possible to import FMU to REXYGEN via FMUCS block. Have you tested this approach?
-
Losing licence in flight mode
Hello, I came accross an interesting bug. When switching my laptop to flight mode, it loses its license. When running REXYGEN studio and trying to download the project, it shows that there is no license and it also shows different Site ID.
After switching back to normal mode, it shows the original Site ID and I have to add an original key from the backup to make it work. It only happens in flight mode. If the wi-fi is simply disconnected (in normal mode, not in flight mode), there are no problems. I wonder if you can replicate this behavior Stepan -
RE: Connection between REXYGEN and Matlab
Thanks, I successfully implemented suggested solution via REST API, it works excellent.
-
Connection between REXYGEN and Matlab
Hi, for testing reasons, I'd like to keep calling a Matlab function from REXYGEN with a certain period (appx 1 second), and to pass results from that function back to REXYGEN. Is this possible? So far I looked at EPC, RDC (using OPC maybe?), REST_API and UDP examples. What would you recommend?