You are not logged in.
Pages: 1
Topic closed
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
Offline
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
Pages: 1
Topic closed