Kasperv79
Member
Hi Guys.
I got an FB1 with some different functions. one of them is to write a string to an Out.
FB1 is called multiple times in FB2.
In FB1 i do move the internal string to the output string like this:
CALL "BLKMOV"
SRCBLK :=#StrTimeTmp
RET_VAL:=#retval
DSTBLK :=#StringTime
A string is as you proberly know build up with n Chars + 2 bytes. 1 byte is lenght of string and byte 2 is actual size/chars in string.
in my example the string is always formated to 11 chars. the problem is that byte 2 is not being updated with the number 11)
When my Scada system (iFix 5.8 + kepserver is driver) reads a string value it reads an empty string, unless i do update my byte 2 with the actual number of chars in my string.
my #StrTimeTmp is located in STAT area starting at 28.0
So i Thought i could du this:
L 11
L DBB 29 (Byte 2)?
also tryid with DIB 29.
My problem is that its only working with the first instance in FB2??
I got an FB1 with some different functions. one of them is to write a string to an Out.
FB1 is called multiple times in FB2.
In FB1 i do move the internal string to the output string like this:
CALL "BLKMOV"
SRCBLK :=#StrTimeTmp
RET_VAL:=#retval
DSTBLK :=#StringTime
A string is as you proberly know build up with n Chars + 2 bytes. 1 byte is lenght of string and byte 2 is actual size/chars in string.
in my example the string is always formated to 11 chars. the problem is that byte 2 is not being updated with the number 11)
When my Scada system (iFix 5.8 + kepserver is driver) reads a string value it reads an empty string, unless i do update my byte 2 with the actual number of chars in my string.
my #StrTimeTmp is located in STAT area starting at 28.0
So i Thought i could du this:
L 11
L DBB 29 (Byte 2)?
also tryid with DIB 29.
My problem is that its only working with the first instance in FB2??