LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert 1d array of long 32 bit to log(32 bit)

Solved!
Go to solution

Hallo all,

 

I'm trying to Connect HAMEG Programmable LCR Bridge with labview, and i connect the instrument to the PCB to measure the impedance in deferent frequencies. I create an array of frequency but you as the VI attached i must convert it from (1D- of long 32 bit) to (long 32 bit) any easy idea to do that in simple way.

 

Thanks all 

0 Kudos
Message 1 of 13
(3,289 Views)

Hi SAED,

 

can you please provide more information on your problem?

 

What is the expected result after conversion of your I32 array? What do you want to receive?

Best regards,
GerdW


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

The log doesn't make much sense on an I32. You'll have to convert to double, do the log, and then (optionally) convert back to I32.

0 Kudos
Message 3 of 13
(3,270 Views)

Are you trying to convert 1D Array of Long 32-bit (whatever that is -- can you describe it using LabVIEW Type names, such as "1D Array of I32", or "1D Array of Sgl", or "1D Array of U32", or something else) to log(32 bit), i.e a logarithm (what base, represented how?), or a long (32-bit), in which case what does this mean?  Are you converting an Array into a Number?  Array into Array?  Is this a TypeCast question, an arithmetic question, or what?

 

The VI that you attached is not helpful.  There are broken wires, missing functions (compress the Project's folder and attach the resulting .ZIP file), and I don't know where I'm supposed to be looking.

 

It is difficult to provide useful help when I don't understand the question/problem.  Can't even guess ...

 

Bob Schor

 

P.S. -- quick way to estimate the log of an Integer (base 2) is to return the index of the most-significant bit.  Well, maybe that wouldn't be so "quick", but it is certainly an easy concept ...

0 Kudos
Message 4 of 13
(3,255 Views)

Hallo,

 

I connect the instrument using USB to the LabVIEW the instrument usually used to measure the impedance of resistor or capacitor..etc I have PCB and I need to measure the impedance of the PCB using different frequencies stating from 1KHz up to 20 KHz or more. I create an array of frequencies but the array is a 1D array of long integer 32 bit and I need to send these frequency one by one to the instrument cause the PCB working up to 2 GHz so I need to check every frequency alone.

 

I hope everything is clear for you now 

 

Thanks 

0 Kudos
Message 5 of 13
(3,238 Views)

@SAED123 wrote: I need to send these frequency one by one to the instrument cause the PCB working up to 2 GHz so I need to check every frequency alone.

Sounds like you just need a FOR loop with an autoindexing tunnel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 13
(3,233 Views)

The main Problem was with output from the for loop is 1D array of long integer 32-bit but I need transfer it to long integer 32-bit.

 

I try the Auto-indexing  tunnel but also it doesn't work.

0 Kudos
Message 7 of 13
(3,210 Views)

Hi Saed,

 

place the loop around the whole code for setting parameters and requesting measurement values!

Pseudocode:

FOR each value in array
  set value
  wait
  get measurement data
NEXT 
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(3,203 Views)

I do it like this and it's work Now 

0 Kudos
Message 9 of 13
(3,195 Views)

@SAED123 wrote:

I do it like this and it's work Now 


Then consider to Accept a Solution.

 

Still a few things on my mind:

+ Every wire (but 2 or 3) has unneeded bends. Why not straighten those wires? 

+ Why not work from left to right (wire going to the config driver VI goes from right to left)?

+ Why convert a number to string, and then convert it back to number again?

+ Why not use the diagram label for commenting the For Loop (more convenient then a free label).

+ That for loop only returns the last Freq Range to the driver. Why not simply take the last value from the array (Delete From Array does that), and remove the for loop?

+ If you want to send each value to the hardware, the driver VI's need to be in the loop.

 

Of course we can't see the hole picture... Nor can we show you as we don't have the VI (just an image).

 

convert%201D%20array%20of%20long%2032%20bit%20to%20long%2032%20bit

0 Kudos
Message 10 of 13
(3,186 Views)