Hi Len,
My code was just an example. Words can only refer to "real" words indeed, but I
believe you have already figured out how to reference the parameters. Just
replace that part of my code with whatever you deem right. Perhaps something
like "repeat with x = 1 to number of chars step 2".
--
Len-
Sunday, February 19, 2012, 8:09:11 PM, you wrote:
> As it turns out, there are only two function codes I have to worry about
> (i.e., ones we actually use): FC 3 - Read multiple registers, and FC 16
> - write multiple registers. FC3 is easy (on the way in) because it has
> a fixed length.
On 2/19/2012 9:05 PM, Mark Wieder wrote:
Len-
Sunday, February 19, 2012, 5:23:11 PM, you wrote:
Related to my problem with reading binary data from a socket, how do I
handle a variable number of numbers that will come in with binaryDecode?
To explain, I get a number in the packet header that
Len-
Sunday, February 19, 2012, 5:23:11 PM, you wrote:
> Related to my problem with reading binary data from a socket, how do I
> handle a variable number of numbers that will come in with binaryDecode?
>>> To explain, I get a number in the packet header that tells me there are
>>> x number of
Hi Mark,
It looks like that's what I'm going to have to do. In looking at your
code though, the "word x" part (where the binary data is) won't that
only work on "real" words that have spaces between them? This is
actually a chunk of binary data where I'm using "word" in the sense of 2
8 bit
Hi Len,
You could use a repeat loop, similar to
repeat with x = 1 to myNrOfWords
get binaryDecode("h*",word x of myData,myTempVar)
put myTempVar into myArray[x]
end repeat
--
Kind regards,
Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com
Share the clipboard of your computer over a
Related to my problem with reading binary data from a socket, how do I
handle a variable number of numbers that will come in with binaryDecode?
To explain, I get a number in the packet header that tells me there are
x number of bytes to follow in this packet. I know the first byte is a
remote
Len-
Sunday, February 19, 2012, 4:08:24 PM, you wrote:
> Related to my problem with reading binary data from a socket, how do I
> handle a variable number of numbers that will come in with binaryDecode?
> To explain, I get a number in the packet header that tells me there are
> x number of bytes
Related to my problem with reading binary data from a socket, how do I
handle a variable number of numbers that will come in with binaryDecode?
To explain, I get a number in the packet header that tells me there are
x number of bytes to follow in this packet. I know the first byte is a
remote