キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Byte Array to Byte

I'm having trouble converting a byte array to a hex byte that I can feed into a Serial Read Vi. The count byte indicates the number of bytes that follow in the message and need to be read. See the bad wiring between the Count array and the Boolean Array To Number converter.
0 件の賞賛
メッセージ1/4
3,488件の閲覧回数
Schmir1,
Replace the 'Boolean Array to Number' function with a 'Array size' function in the diagram.

Pravin
0 件の賞賛
メッセージ2/4
3,487件の閲覧回数
Hi schmir1

Let me see if I have got this right:
You want to get a byte in a string and convert it to an U8?

If so then there is a couple ways of doing this:
- You can use the string to byte array and then index the first element in the array.
- Or you can cast the string to an U8

Tim

P.S. your example didn't include the Serial Read.VI, to do this create a 'development library' from 'save
with options' menu item.
But I sorted out what you wanted to do from what was there.


schmir1 wrote:

> I'm having trouble converting a byte array to a hex byte that I can
> feed into a Serial Read Vi. The count byte indicates the number of
> bytes that follow in the message and need to be read. See the bad
> wiring between the Count array and the Boolean Array To Number
> c
onverter.
>
> ------------------------------------------------------------------------
> Name: Research_TelB.vi
> Research_TelB.vi Type: LabVIEW Instrument (application/x-unknown-content-type-LabVIEWInstrument)
> Encoding: base64
> Description: Read message based on count
0 件の賞賛
メッセージ3/4
3,487件の閲覧回数
Cast to String didn't work for me but got me to look around. I found that Unflatten From String function was what I needed.

Thanks
>>> Bob <<<
0 件の賞賛
メッセージ4/4
3,487件の閲覧回数