02-24-2020 02:49 AM
02-24-2020 03:06 AM
02-24-2020 03:17 AM
RdData is a char buffer, so every element is a single byte.
You should Type Cast the receive buffer to a U8 array, then index this array to get individual elements.
Moreover: the LabWindows code specify 0xFF = 255 as the termination character: you should do the same when calling VISA Configure Serial Port.
I think you should also make sure you did not receive an incomplete packet (easy if you know what's the packet length).
02-24-2020 03:54 AM
Hello pincpanter,
02-24-2020 04:03 AM - edited 02-24-2020 04:04 AM
Drop an array shell
Put a numeric in it.
Right click and select "representation"
Select U8.
Also there is a function "String to byte array" which will do the string -> U8 array conversion.
02-24-2020 04:15 AM
To wire a constant to a subvi, right click on the desired input terminal and select Create Constant (or Control or Indicator depending on what you want to do). For integer constants/controls/indicators, the display format is usually decimal (d), however you can explicitly show it right-clicking on the constant and selecting Visible Items -> Radix. Then you can select the radix clicking on the symbol (d, x, etc).
Also, if you don't find a function in the palette, you can try to use QuickDrop: type Ctrl-spacebar and search a text in the list that will show up.
02-24-2020 05:47 AM
You mean this here?
02-24-2020 05:54 AM
Yes, it's the right function
02-24-2020 06:02 AM
02-24-2020 06:23 AM
Hi Majk,
@MajklS wrote:
And to create U8 Array, do I have to enter a constant?
This really is explained in the LabVIEW basics - see the "Training resources" offered in the header of the LabVIEW board…
You're done.