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

Re: NI VISION IMAQ overlay image

$
0
0

Hi,

 

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

raphschru_0-1728152367833.png

 

Regards,

Raphaël.


Re: Find visa resources in RT

$
0
0

Use NI System Configuration API. It can be run on the host PC to query the resource in RT.

Refer to the shipping example Help >> Find Examples... >> Hardware Input and Output >> System Configuration>> Show All Hardware

Use ni-visa as the Experts for the System Configuration API Functions

ZYOng_0-1728161339826.png

 

Re: Synchronization of multiple AI voltage channels by using X-6363 USB

$
0
0

That example is for synchronizing multiple devices. Are you using multiple devices? What is the model of another device, other than the USB-6363?

 

If you are using multi-channels inside a device, you can use Channel Expansion

Re: Continuous Counter with Threshold Check using Queued Message Handler

$
0
0

Hello, thanks for response, please find the file which is 2020 version of my vi. 

Re: Continuous Counter with Threshold Check using Queued Message Handler

$
0
0

As they say, "Close, but no cigar!".  I requested "A small compact Demo Project, with all TypeDefs and sub-VIs included, would be ideal, especially if "Save(d) for Previous Version" including LabVIEW 2019 and 2021."  You sent only a "Main" VI, but there are no TypeDefs and other things that appear to be in a "Support" folder.

 

Can you make a copy of the Project Folder (I'm assuming that you have a folder that holds the Main, the .lvproj file, a folder called Support that maybe has TypeDefs and Sub-VIs, and maybe other pieces we might be interested in seeing.  If you copy the Folder and give it another name, you can delete from the folder things that are irrelevant or you don't want us to see.

 

Bob Schor

Re: Trigger a camera by a motor steps

$
0
0

Hi there,

 

If your USB3 camera has a trigger line input, you can use it to capture images.  You can send a trigger signal from your motion controller for each rotation, as long as the controller supports this.

 

If the camera doesn’t have trigger support, you'll need to use software-based triggering. You can set up a while loop to monitor the motor position and capture images when it reaches the desired point.

 

BR

John

Add motion to LabVIEW in 30min or less - TENET EMotion
Finding it hard to source legacy NI hardware? Try Extend Test

Re: Import Vulkan API libraries to LabVIEW

$
0
0

Update: I managed to make half of the functions recognizable by the wizard tool by replacing macros that the wizard cannot interpret. One example is below:

joshdoe420_0-1728180471844.png

Now there are about half of the functions left, all have the macros VKAPI_ATR and VKAPI_CALL

joshdoe420_1-1728182183726.png

these are being declared in vk_platform.h so I changed the header file to vulkan.h instead because it includes both vk_platform.h and vulkan_core.h:

joshdoe420_2-1728182601559.png

and have the following include/definitions:

joshdoe420_3-1728182901395.png

The reason I add _WIN32 and VK_USE_PLATFORM_WIN32_KHR is because they are necessary to define __stdcall:

  • in vulkan.h:
    joshdoe420_4-1728183386327.png
  • in vk_platform.h:
    joshdoe420_5-1728183438892.png

However it seems that _WIN32 and VK_USE_PLATFORM_WIN32_KHR doesn't do anything significant and preprocessor definition is incomplete but I will try adding some more and see how it goes. If anyone have an idea, your help would be greatly appreciated.

Re: Find visa resources in RT


Re: Import Vulkan API libraries to LabVIEW

$
0
0

Watching your attempts here I get the impression that you barely know how to use this API in C, let alone in LabVIEW and that you believe the Import Library Wizard magically will create an import LabVIEW Library that lets you use this API joyfully. But the Import Library Wizard can’t do magic, despite its name.

And magic it would need to allow an automated tool to create a fully working VI library to import any but the most basic APIs just from a header file. Vulkan for sure is anything but basic!

The C syntax is minimalistic, just barely enough to tell a compiler how to create code but far from helping that compiler to create correct code. A pointer in C can be a reference to a scalar, a memory buffer or a reference to a memory buffer, or gasp, really just about anything the programmer imagines. The only way to know what it means is from:

- reading the according function documentation 

-in lack thereof or a very bad documentation which is rather the norm than the exception, from experience based on naming conventions in the variable names

- from existing example C code showing how to use the API correctly

- from trying and testing, crashing and refining and trying again over and over

 

None of this is anything an automated tool can do no matter how much Algorithmic Intelligence you throw at it!

 

It means that even if the Import Library Wizard created VIs for any of your functions, someone who knows C programming very well, is intimate with the API in question and can dream its functions in their sleep and also knows LabVIEW well, will have to review and often significantly modify every VI created by the wizard carefully. Otherwise you simply get a VI library that rather sooner than later will crash your computer, eat your hard drive or try to assassin your sanity!

Re: Synchronization of multiple AI voltage channels by using X-6363 USB

$
0
0

Hi,

 

Thank you for your response. I will be using a single X-6363 USB device, and I intend to synchronise multiple AI channels by designating one channel as the master, with the others functioning as slave channels.

Once again, thank you for your assistance.

 

Kind regards

 

Hasham 

Re: Synchronization of multiple AI voltage channels by using X-6363 USB

Re: Editing selected rows in multicolumn listbox

$
0
0

The MCLB has an "Allow Editing Cells" property. You should be to use the mouse move event, create an invoke node for the MCLB and select the Point to Row Column method to get the specific row and if that row is in your list, set the property to true. In principle, you could also use the symbols display on the MCLB to show your checkboxes, and if the user is the one who selects which rows can be edited (I expect not), use the same method to detect the click on the symbol and toggle the row state accordingly.

 

Another option might be something like using a single or double click event and if it's on an editable row, pop up a modal dialog which has a nicer UI for editing the value. I'm not a fan of editing things directly in text tables most of the time anyway, so I think I would prefer that anyway.

Re: Excel related error

Re: Import Vulkan API libraries to LabVIEW

$
0
0

Yeah I don't know how the wizard works under the hood because I only import .NET assembly before all this, way less hassle.

I did some more digging and it seems that writing a wrapper is the only way now.

Re: issue with PPS signal to trigger AI start

$
0
0

Besides the filter delay there is the following issue:

Accuracy of the Waveform Timestamp Returned by NI-DAQmx 

 

Use the GPS to trigger at a know time; then after acquisition change the t0 in any files. Not optimal, but unless you have a TSN network and TSN supported cards, not available on PXI, then that is the only option.


Re: Continuous Counter with Threshold Check using Queued Message Handler

$
0
0

Hello,

these are the two versions of my folder 🙂 thank you

Labview - NI myDAQ

$
0
0

Hi everyone,

I have some questions when connecting 2 servo motors to myDAQ to control through logic in LabView. However, I can only use one DIO3 to use PWM. After searching for information online as well as asking chatGPT, the solution is to connect to control the 5V input source through ports such as DIO1 and DIO0 for the servo motors. Is there any other feasible solution or is there only one way to control and control the pulse width separately?

I am doing a project for a subject in university, but have not found any reading source that solves this problem. So if possible, can everyone please provide me with some related supporting documents?

Best,
Huy Le

Re: Editing selected rows in multicolumn listbox

$
0
0

The "value" of a multicicolumn listbox is the selected row (or rows if so configured). The items is a property.

You could for example use a double-click even to pop a dialog that contains the items in an array of strings where you can modify the values and an [OK] button that accepts the change and update the items on return (and a [cancel] button to not do anything).

 

Re: Editing selected rows in multicolumn listbox

$
0
0

@altenbach wrote:

You could for example use a double-click even to pop a dialog that contains the items in an array of strings where you can modify the values and an [OK] button that accepts the change and update the items on return (and a [cancel] button to not do anything).

 


 

Here is a simple example for that.

Re: Program ni hardware using C code

Viewing all 203853 articles
Browse latest View live