I have a trouble using MESSAGE function reference value .
My easy sample is attached one.
Which has:
to show=Time+1
Start=IF THEN ELSE( start signal=Time,MESSAGE('\to show/',1) ,0)
start signal=6
I hope to return MESSAGE value "7".
But it return "6" in my environment.
I think it mean 'to show' value is previous value when 'Start' function active.
Is there a culculation order ?
I hope your support.
Yusuke tarumoto
reference value in MESSAGE
reference value in MESSAGE
- Attachments
-
- message.mdl
- (1.61 KiB) Downloaded 249 times
-
- Super Administrator
- Posts: 4838
- Joined: Wed Mar 05, 2003 3:10 am
Thank you see my model
To show my trouble.
I attached capture of simulation.
I find to change "integration type" Euler to another
will change the message value correct one.
To use Message function, integration type selection
is important?
Yusuke tarumoto
To show my trouble.
I attached capture of simulation.
I find to change "integration type" Euler to another
will change the message value correct one.
To use Message function, integration type selection
is important?
Yusuke tarumoto
- Attachments
-
- screen.jpg (46.65 KiB) Viewed 3485 times
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Hi Yusuke,
You have uncovered an interesting deficiency in the use of the MESSAGE function. During equation ordering the displayed value coming out of the message function is not considered. This means that the variable "to show" is not computed until after "start" is already computed so the MESSAGE function get the old value for this. You can work around this by being sure that the equation with the MESSAGE function is embedded appears last alphabetically (starting with a Z if only alphabetical characters are used or you will need to just look in the variable list to see what is latest if you are using Japanese).
You have uncovered an interesting deficiency in the use of the MESSAGE function. During equation ordering the displayed value coming out of the message function is not considered. This means that the variable "to show" is not computed until after "start" is already computed so the MESSAGE function get the old value for this. You can work around this by being sure that the equation with the MESSAGE function is embedded appears last alphabetically (starting with a Z if only alphabetical characters are used or you will need to just look in the variable list to see what is latest if you are using Japanese).