Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2017-01-09 15:34:05

rexpeter
Member
Registered: 2016-09-06
Posts: 67

Changing Block Parameter based on variable within source code

Hi,

I'm wondering how I can change a block parameter based on a variable within the source code?
Block parameters easily can be changed using the web interface, but how to do that based on a variable of another block?

I would like to change the y2 parameter (currently 1) based on the SNI_selector_y2_LIN_RTD10 selection. So it either will become 1, 10, 100 or 1000.


Screenshot enclosed for further clarification.

Thanks in advance for your help.

Regards,
Peter

FluxBB bbcode test

Offline

#2 2017-01-10 11:24:54

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: Changing Block Parameter based on variable within source code

Hi Peter,

thank you for your question. You pointed out really useful feature.

It is possible to change parameters inside function blocks using block SETP* (A - array, B - boolean, I - integer, R - real, S - string) - see docs https://www.rexcontrols.com/media/2.50. … f#page=313

These blocks can be triggered by pulse or can work in continuous mode.

For parameter change detection (SELQUAD output in your case) you can use difference function block "DIF_" followed by  relation operator "REL" set to be active when inequal to zero.

It is also possible to Read and Write parameters within Rexlang code - look for GetExt*() and SetExt() functions.

Hope it helps!

Cheers, Tomas

Offline

Board footer

Powered by FluxBB