12-19-2023 03:57 PM
My end task is to send commands over UDP to an FPGA. The commands are available in Python script.
I haven't worked with byte arrays for years and am looking for some help.
Attached is LoopThroughItemNumber.vi I want to replace the hex value in column 5 to change a setting.
I manually created the array that works but am struggling with code to do the same thing. Thank you in advance for looking at this.
Solved! Go to Solution.
12-20-2023 01:28 AM - edited 12-20-2023 01:29 AM
12-20-2023 10:17 AM
Hi GerdW,
Your answer helped. Attached is a new file saved for LabVIEW 2021. I apologize for not thinking to do that with the first post.
In the 2021 version I added code to change the item number.
Thank you for your help!
kierzie
using LabVIEW 2023 on Win10/11
12-20-2023 11:32 AM - edited 12-20-2023 08:10 PM
12-20-2023 11:47 AM
12-20-2023 03:33 PM
Or this:
12-20-2023 03:37 PM
Thank you very much! We will be using array index 5 because of the way the embedded engineers wrote their code. What I need to change is in the second byte of the U16.
raphschru's advice to use 0x%x will probably work as well.
The replies helped me get past a huge roadblock.
12-20-2023 03:45 PM
This solution works also, once I changed the array index from 4 to 5!
12-20-2023 08:01 PM - edited 12-20-2023 08:31 PM
@raphschru wrote:
@altenbach the scan format should be 0x%x instead of 0x%d.
Sorry yes, small typo. (Of course it does not make a difference if all numbers are very small has seen here). 😄
(I edited my post to avoid confusion in the future)
12-21-2023 01:39 AM