16:42, EET
December 6, 2017
Howto use the “expression” based simulation of signals?
1. The input field seems to accept only constant expressions like “5+1”. I’d like a (“(random value * 100) mod 54”).
2. In the table below the input field I can select some “Variables” but the field “Symbol” does’nt accept any input. I have entered some text, after leaving the field is reset to “Enter symbol”.
Are somewhere some samples howto use the “expression” based simulation?
10:18, EET
April 3, 2012
Hi,
The manual mentions:
“Expression signals can be defined with a custom mathematical expression. The expression may
also refer to other signals, which are defined with the Inputs parameter. Expression signals cannot
be used as inputs for other expressions.”
But other than that, no.
The links editor is a (JavaFX) table, which by default does not commit new values on defocus, instead you must press Enter to confirm new value (we should change this at some point as this is not very clear).
The “(random*100) mod 54” could be done by first making one Random signal, then adding that to a link variable e.g. “a”, and then entering “(a * 100) % 54” for the Experssion.
It is tested for simple uses, but the built-in functions of https://lallafa.objecthunter.net/exp4j/v0.3.11/ should work (Simulation Server uses that to calculate values at the moment) . In addition there is variables “Pi” for pi and “t” for simulation time in seconds.
– Bjarne
Most Users Ever Online: 1919
Currently Online:
8 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1