From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i print the string and integer both together

Solved!
Go to solution

Hi,

 

My requirement is like printf statement in c.

I have the 32 bit array of integer data.

I want to print in the labview like 

 

u32Data [0] :  0x12345

u32Data [1] : 0x45566

 

similary in c code is

 

for (i=0; i<5; i++)

printf ("u32Data [i] : 0x%X ", i, u32Data [i]);

 

similarly like this how can print it in the string pallette or any other.

 

 

 

with regards and warm welcome,
Ramamoorthy S
0 Kudos
Message 1 of 4
(2,235 Views)
Solution
Accepted by topic author ramji44

Hi Rama,

 

use FormatIntoString in an autoindexing FOR loop:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,226 Views)

Can you please tell me.

How to create the macros in the labview.

 

 

Like below mentioned 

 

#define sqrt (x)   (x * x)

 

with regards and warm welcome,
Ramamoorthy S
0 Kudos
Message 3 of 4
(2,221 Views)

Hi Rama,

 

there are no "macros" in LabVIEW. There are built-in functions and functions made by you.

SQRT() is a built-in function available in the math/numerics palette! And you will also find a SQuaRe() function - it's irritating to name a term like "x*x" with a common abbrevation of SQuareRooT()!

 

Please stop creating duplicate posts! This is highly annoying...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,163 Views)