Good morning,
I want to show a numeric variable value in a dialog message, for confirm or cancel other questions. I have read some documentation pdf's but I didn't found the answer. Is it possible to do it? And how?
Thanks!
Good morning,
I want to show a numeric variable value in a dialog message, for confirm or cancel other questions. I have read some documentation pdf's but I didn't found the answer. Is it possible to do it? And how?
Thanks!
KSS?
yeah, sorry, it's a krc4 with KS 8.3
I hope that your information ask means it is possible to do!!
i will aldo ask how bad my english is but it's better to leave this for other time
of course it is possible...
ok, sorry about delay, i was tied up...
when using 'long version' of message programming, you can embed up to 3 parameters.
when using MsgLib, you can get things in one line but only 1 parameter is available.
in case of dialog, that one parameter must be of type string.
Thanks Panic for put me in the right way!
Even if i didn't get it with the msglib option (I don't understanD why), finally it is working well with the long version! Thanks!
Alternatively, you can embed up to 10(?) variables in a string using SWRITE, before posting that string as a message. Or, if you daisy-chain consecutive SWRITEs, you could insert unlimited variables, but you'd hit the 80-char limit for message display pretty quick.
Hi everyone. I would like to do the same show in an MsgDialog (Answer, "READ WELL, DO NOT SKIP LINES !!",$glasses" ,,,,,,,, "OK", "CANCEL",) where you put glasses put the number, an integer that I receive from the plc and I do not get it .. My code is as follows
MsgDialog (Answer, "READ WELL, DO NOT SKIP LINES !!", "glasses" ,,,,,,,, "OK", "CANCEL",)
; INT declarations
DECL INT Answer
DECL INT glasses=1
Thanks
just read declaration line of the MsgDialog and you will see that it only accepts the string as embedded parameter. so you need to convert integer to string. also you need to specify WHERE that parameter is to be inserted by placing %1 into your message line
Do you have an example of this(convert to string) i cant do correct..
conventional way is to just use SWRITE command. it is documented in CREAD/CWRITE manual.
for a single digit, direct ASCII conversion may be easier.
In ASCII table digits are values 0x30..0x39 so just add 0x30 (which is 48 in decimal).
oh, and you do need to pass an array, even if it is single char.
can be 1 to 24 the numbers, what you recomend me to use?
Guess.... i already explained SWRITE is your friend and where to find it...