Quantcast
Channel: All LabVIEW posts
Viewing all 203721 articles
Browse latest View live

Re: Import Vulkan API libraries to LabVIEW

$
0
0

A .Net assembly contains an extensive type library resource that describes every object and its methods and global functions that assembly exports. It describes for each parameter the exact datatype, and if it is an array or string buffer its lifetime and minimum size requirements and together with the managed nature of .Net which defines how, and when a caller or function can and should allocate or deallocate a memory buffer, you can easily call any managed code as long as both caller and callee use the same managed contract. LabVIEW’s native datatype system is in fact managed too but predates .Net more than 10 years and Microsoft for some “strange” reason decided to develop their own managed environment. 😀

When you select a method name in a .Net node, LabVIEW retrieves the type library entry for that method from the assembly and creates often fairly involved code in the background to translate between its own managed memory space and the .Net managed system before the call and back after the method call returns. If the assembly programmer didn’t do any error when creating the type library this works usually perfect. But there is no such thing as a type library in normal C DLLs. The only thing you have is the header file and a hopefully extensive library documentation in the form of more or less comprehensible text document. But that is prosa text and not suited for automatic processing, not even by an Algorithmic Interpreter (AI).

 

C is the exact antithesis to a managed environment. Every library developer is free to use whatever fancy memory management system he likes and even use several different ones for different APIs because C is a language that tries to put as few limitations on both the C compiler builder and programmer as possible. Virtually anything that could be done with a CPU can be done in C! The C syntax consequently has not even as much as compiler hints about the memory management aspects of parameters because there would be several options and many more variations on them that are hard to formalize in a syntax without severely limiting those options (basically what managed is about).

The Import Library Wizard is simply a header file parser that understands the  C syntax well enough to extract the fundamental information about the functions declared in that header. It’s quite a complex parser as the C syntax is fairly complex to decode, but it is not rocket science. I implemented my own in the past for a project. What it can’t do is invent information that is not in the C syntax itself. Text comments it has to ignore just as naming conventions in parameter names, because they are not formalized and seldom consistent, often not even in the same header file.


Re: Erreur 1172 (Le périphérique n'est pas disponible )

$
0
0

L'objectif c'est pour détecter des usb connectés dans mon systèmes. 

 

J'utilise un driver Agilent série 3446X sur le pc développement. Est-ce-que je dois l'installer sur le deuxième pc. 

Etant donné que j'utilise juste l'exécutable (.exe) est-ce qu'il faut installer la librairie le deuxième pc :  NI-DMM .NET Class Libraries 17.0    

 

Merci! 

Re: How to change the speed (tempo) of the voice without changing the pitch?

$
0
0

wiebe@CARYA wrote:

@JÞB wrote:
You will need to resample the audio data to match the new dT.

That will give you the original signal, but resampled.

 

The problem is much harder.

 

The audio has a frequency range, and the speech too. You want to decrease the speech frequencies, but not the audio frequencies. 


Yes, this is true. Let’s imagine a pure sine tone signal at 440 Hz. If we would like to increase its length, then additional periods need to be inserted into the waveform to maintain the overall frequency. This is fairly easy in the case of a pure sine wave, but it becomes a bit more complicated with real voice signals. Therefore, we should work in the frequency domain using STFT. I found a MATLAB script where a phase vocoder is implemented. I may reimplement this in LabVIEW, (I had hoped that someone had already completed this exercise). I also have some ideas on how to approach this using wavelets. For now, I've discovered a very simple solution called the Rubber Band Audio Time Stretcher Library, which implements a high-quality time stretcher that works significantly better than Audacity, with almost no distortions. The only minor drawback is that I need to temporarily save the waveform as a *.wav file, perform the stretching with command line tool, and then load it back, but everything works quite well.

Re: OPC-UA Toolkit is no longer developed. What a shame.

$
0
0

Hi Rolf,

sorry if I'm too simple, but I will find useful also a lib that give me back a variant.

I mean, how much time will I loose for each variable with a generic approach like that?

I'm doing a demo that doesn't do anything else so, until now, I'm not worried by performance.

Re: Intensity graph color mapping bug with u8 representation

Re: OPC-UA Toolkit is no longer developed. What a shame.

$
0
0

Well, my library interfaces with the Open62541 library which is a comprehensive OPC UA implementation. And this library returns data in a binary format that is not directly interfaceable to LabVIEW through the Call Library Node at all. So I have to write an intermediate wrapper shared library (DLL) in C to translate between the two. And while supporting all the different datatypes is quite a bit of repetitive work on the LabVIEW side, it is the only way I can implement such a library on the C side in the DLL wrapper, since the LabVIEW Variant datatype is NOT documented how to interface to it on the C side of things. It's obviously possible as the NI OPC UA Toolkit shows, but it's for now not an option for me to use since NI does not  document how to do that.

 

The NI OPC UA Toolkit uses LabVIEW Variants in the interface from and to the DLL and then translates them internally to whatever the underlaying OPC UA code they use requires and back. As such what you do in your VI could be done easier with the "Multiple Write (uint32)" and "Multiple Read (Double)", which are simply wrappers that convert the Variants to specific datatypes on the LabVIEW side. That's convenient as it requires only one generic interface in the C code, but not very performant since there are factually several conversions going on that way, OPC UA stream->OPC UA native datatype->LabVIEW Intermediate DSC flatten format->LabVIEW Variant->LabVIEW specific datatype. But my reason not to go this path is not that it is less performant, but because I have no information how to interface to a LabVIEW Variant on the C side of things.

 

When I'm finished with the current datatype conversion on the C side, I have an OPC UA library that is almost perfectly compatible with the NI OPC UA library, with additional functionality, but without support for LabVIEW Variant datatypes, because I can't implement that without more detailed information from NI themselves. For completeness, I have to say that I haven't tried to get this information from NI yet. I don't know at this point if NI would be willing to share such information in any way and may seek to get such information at a later stage. It wouldn't make the code on the C side much easier though, just different. The only advantage of the use of Variants would be that I also can support other OPC UA datatypes such as structures (LabVIEW clusters). Adding Variant support later on, if I get the necessary information, will however be a fairly easy exercise.

Re: Reading and writing of binary and TDMS files

$
0
0

I made those changes as per your instruction. I am sharing the screenshots with you.Write BinaryWrite BinaryWrite TDMSWrite TDMSRead BinaryRead BinaryRead TDMSRead TDMS

Re: NI VISION IMAQ overlay image

$
0
0

@raphschru wrote:

 

No need for IMAQ, you can do it using the vanilla Picture Functions:

 


Unless you need to use subsequent IMAQ functions and don't want to convert back and forth.

 

RamonG_0-1728290195464.png

 

RamonG_1-1728290222386.png

 


Re: I2C + Call library function node

$
0
0

Hi, 

 

When i run this VI I am able to see the I2C command byte in the scope, however not the data being sent. 

I have attached the VI and the image below is the command structure. I have the start and stop working, and it sends the address but it dosen't send the buffer data. 

CatherineBrown_0-1728290796765.png

Edit to add image of scope: 

 

CatherineBrown_1-1728291207000.png

 

 

Re: Bug in NXG XY graph when zooming in

$
0
0

LabVIEW NXG has been out of development ("abandoned") for several for several years, now, which probably explains why no one has responded to your Message.  You need to start over with "classic" LabVIEW.

 

Bob Schor

Application Builder Broken VIs error...

$
0
0

I'm working on a existing collection of VI that I need to reorganize and compile into a single application.

Starting from the main shell vi I tried to create the application but I'm experiencing some problems.

When I try to Build the application I got this error:

 

Cannot complete build because following VI loaded broken:
C:\MAN_TEST_1_4_4\Shell\Shell_MAN_2_liv_1p4.vi
Open the VI in LabVIEW and fix the listed errors. If the VI loads as expected but errors are still
detected during the build, contact National Instruments technical support for assistance.
Broken VIs:
- Serial_IO.vi:
VI failed to compile.
 
Details:
 

Click the link below to visit the Application Builder support page. Use the following information as a reference:

Error 1003 occurred at AB_Get_Detailed_BrokenVI_Message.vi -> AB_Targetfile.lvclass:Open_Top_Level_VIs.vi

Possible reason(s):

LabVIEW: The VI is not executable. This error may occur because the VI is either broken or contains a subVI that

LabVIEW cannot locate. Select File>>Open to open the VI and verify that you can run it.

 

I'm not a LabView expert but it sounds that Serial_IO.vi should have some missing references or errors.

But If I check Serial_IO.vi subVIs all files are available.

 

What else I can do to identify the problem?

 

Best regards,

 Michele Santucci

Re: Continuous Counter with Threshold Check using Queued Message Handler

$
0
0

I am so sorry -- I expected that you were working on a LabVIEW "Project", a series of VIs and Controls and other things managed by a LabVIEW Project file (of the form "Project Name".lvproj), and when you opened the Project, you did a "Save for Previous Version) (which can sometimes pull in lots of extraneous stuff).

 

In your case, there are VIs, TypeDefs, and Libraries all "disconnected".  Do you have your Project in LabVIEW 2024 (which I don't have, but can probably "borrow" a colleague's PC to look at your code)?  If so, try to upload enough of your current "almost-working" LabVIEW Project so I can take a look without every single VI having all its "links" broken.

 

Bob Schor

Re: Application Builder Broken VIs error...

$
0
0

Two solutions:

  1. Bring a LabVIEW Expert to your problem.  [Hire a consultant].
  2. Bring your Problem to a bunch of LabVIEW Experts.  [Attach a zipped version of your entire LabVIEW Project, including the .lvproj file and any/all libraries or external code it calls].

Bob Schor

Re: How to get save option of a camera image on front panel and automatic save option

$
0
0

Your image of part of a LabVIEW VI cannot be edited, examined closely, or executed.  Can you create a new LabVIEW Project that contains a small Demo illustrating the problem you are facing, and attach the entire Project?  Note that many experienced LabVIEW Developers are not using LabVIEW 2024 -- you will reach a larger group with IMAQdx experience if your Demo is in LabVIEW 2021 or 2019.

 

Bob Schor

Re: LabVIEW not recognizing VIs in my palette in LabVIEW 2021 32bit

$
0
0

The ULx functions are the Universal Library functions for Measurement Computing Corporation (MCC) DAQ hardware, nowadays part of Digilent, which is a subsidiary of National Instruments.

 

You need to install the Universal Library from MCC. You will need to install the ULx Drivers for LabVIEW support and of course a compatible MCC DAQ board. This library won't work with NI hardware or any other hardware than MCC boards. If you properly installed this already you will need to contact Digilent support. Even though it is an NI subsidiary the NI engineers often don't have any experience with this hardware.


Re: RS485 keller sensors communication

$
0
0

Thank you Marco for your understanding. My worries are that after I connect my transducers to that converter ( RS485 - RS232 converter ) the RS232 will be connected to NI PCI-e 8431/8 board which is using RS485 communication protocol, So do you think that would work or not. This board (68 pin) is connected to NI cable that provides 8 DSUB9 interface ports and shown on the PC as (COM ports). Thank you.  

Re: Using the LabVIEW Shared Variable

$
0
0

On the PCs where the shared variable is working as expected, I can see that "NI Variable Engine" & "NI PSP Service Locator" are both running, but not "NI Configuration Manager".

 

On the PC where the shared variable is NOT working, I can see that "NI Variable Engine" & "NI PSP Service Locator" are both running, but not "NI Configuration Manager".

Re: Doubt on Waveform Graph

$
0
0

You do realize, I hope, that Displaying Data is entirely separate from saving data.  If your data are coming at 1 Hz, you should have time in that loop to both write the sample to a file and plot it on a Chart.  If you make the Chart a 

write the datum to a file, (b) plot it on a Chart, perhaps using "Scope" or "Sweep" mode to keep the Chart from scrolling ("Scope" is like an oscilloscope -- after 300 points, it erases and starts over, while "Sweep" starts over, but "auto-erases" the point it is about to overlay).  [Note this assumes that the Chart length is 300 points].

 

Bob Schor

Re: How to change the speed (tempo) of the voice without changing the pitch?

$
0
0

Hi

 

I guess what you want to do is covered in the commercial product Auto-Tune.

 

With Antares as the original company inventing it. Interesting development story by the way.

 

Regards

 

Re: LabVIEW Control ref to ActiveX ref

$
0
0

@Madottati wrote:

Launching the VI and then passing the reference is working - but I still have doubts about your comment 

"The value of an ActiveX control is (concerning the value) not different from a string value."

 

A string has a default value. But after placing an ActiveX container on the front panel I have to insert an ActiveX object in edit time. So that object is the default value, and I expect it to be valid, when the VI is not started. 


OK, in my defense I didn't get to see all the details of your main.

 

I didn't know your ActiveX control was a front panel container, from your description it could also be a normal ActiveX reference control.

 

I don't really know when a ActiveX container becomes valid. I wouldn't think it's valid before the VI is run, but maybe it becomes  valid when it isn't idle (e.g. not editable), or maybe it takes time to become valid after running. I don't know...

 

I try to avoid ActiveX. It never was convenient to work with and now it's dated as well...

Viewing all 203721 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>