Quantcast
Channel: LabVIEW topics
Viewing all 66787 articles
Browse latest View live

Detector de energía


How to activate LabVIEW Community Edition

$
0
0

I tried to find the serial number by going to my NI account 

 

Under "My Products & Services"
Click on "My Products"

 

But it shows that there is no  serial number.

Add terminal nodes after creating message in actor framework

$
0
0

Sometimes I forget to add a terminal on my vi/dispatch template before creating a message out of it.  I then run into issues trying to recreate the message with the terminal added because it says name already used or w/e. Even if I remove the first message from my library it still hiding somewhere.  I end up having to change the name of the VI and then create another message.  Is there a way to efficiently add the forgotten terminal to the message type cluster inside that generated send message vi?

What is best: Multiple queues, Global variable, references?

$
0
0

Hi.

 

I'm taking over an application in which the software has to communicate with a distant platform via Wifi.

This was very not well handled and I'm trying to do a better job out of it in a limited amount of time (and experience, please bear with me for any dumb thoughts) as in not redo the whole program, for now.

 

So here is my situation:

The platform accepts two types of commands: Controls (moving actuators, activating power lines etc.) which doesn't send back any reply whatsoever, and Requests which send a specific reply.

e.g. "0,B2,M, >Data<" This corresponds to "Error_code,CRC,Identifier, Data requested".

The identifier is specific to the request: Request a motor position, Id=M ; Request a Health Check, Id=H etc.

 

So I'm trying to centralise the communication and the data management into two loops, and then send the appropriate data to the appropriate function. (Originally the guy was handling the comms in every subVIs, IT was terrible to get the appropriate answer)

It looks like this for now and it works fine:

 

VinnyLaTaupe_1-1599472107852.png

 

 

The Communication Loop receives any commands from other loops, send it over the platform, and send the repply (if any) to the Data management loop.

The latter will analyse this reply and convert it, eventually build an array with the data (for graphs for instance) and .... For now send it over a specific cluster. (The "platform general state" cluster isn't used for now I've created it as I wasn't sure if I would need it or not)

My concern now is on how to properly send my data to the proper VIs running in parallel loops: Send automatically the Battery State to the Battery_management.vi etc. The easiest would, I believe, definitely be Global Variables, but I know that with growing arrays this would be terrible.

Should I then just create one queue per "application" (as in Health check, Battery State, Motor status etc.)? This sounds like a lot of queues to me, but probably the best solution? Even maybe using the the unique queue name to be used in different VIs.

I also thought of using references of the appropriate data clusters, not sure that would work though.

 

Thanks a lot in advance for your suggestions.

Vinny.

Doubts about module NI 9208

$
0
0

Hi all,

 

I have some doubts abount the module NI 9208. In an existing project I have a cRIO 9035 with two Ethercat NI 9145. In the ETH1 I have installed 8 NI 9208 module which read analog measures from several pressure and temperature sensors.

 

In the cRIO I have a timed loop that is set for sampling at 50Hz (20ms). In particular that cycle read all 16 channel from the NI 9208 on slot 2.

 

From the datasheet the NI 9208 has a frequency sample of 500Hz aggregated that means 31,25Hz per channel. This means that I can't acquire from a single channel at 50Hz?

 

In the timed loop at 50Hz I don't have delay and the cycle end always in time. The data that I read from the NI 9208 are correct or I read a buffered value because I am sampling at a frequency higher than that allowed?

 

I hope someone can clarify me this points because probably I am missing something.

 

Penzium

 

 

Why is my Elvismx DMM's sampling rate is so low?

$
0
0

Hi, I'm using LabView 2015 Sp1, with NI PCI-6221 connecting to BNC 2120, and NI myDAQ.

I am trying to measure Voltage and Current at the same time. But PCI device can only measure up to 40mA(I'm not sure about it, since I cannot find anything about this at manual) which is quite low for my elements, since my experiment current usage is at least 0.3A.

So I have no choice but to use myDAQ's DMM port to measure current.

 

Anyway, I integrate both measurement device with LabView and the problem begin. When I use only PCI device, sampling rate is no problem.

But with two device, the sampling rate is down to less than 1 sample per second, which lead to inaccurate result.

I added the 'Time Delay VI Express' and set the time to 0.5 second, but it doesn't work.

Plus, I made current measurement VI independently, it shows low rate too. So I don't think it's because of orginal VI.

 

Are there any ways to improve sampling rate of Elvismx? Is this hardware(myDaq) limit that I can't fix this with software?

How do i send data from labview to arduino via VISA

$
0
0

Hello Everyone, 

 

I'm reading data(RS485) from a mass flow controller(by AALBORG Instruments) in labview via VISA. The data i'm reading is the mass flow. I want to send the received data .i.e mass flow from labView to Arduino board for displaying the data on an LCD. 

I'm attaching the VI in which i have used VISA Write to send the data( mass flow) to Arduino board. 

I'm unable to receive any data in my arduino. 

I'm receiving an error message on the serial monitor of the arduino( with respect to the arduino sketch i have written).

I'm also attaching the arduino sketch.

Any help would be really appreciated.

Thanks in advance

KB

Create ZIP and add files to ZIP

$
0
0

After saving five images into my test directory I would like to make a vi that will create a ZIP and add the five image files to the ZIP. I have no problem creating a ZIP, but the add file to ZIP vi has an input "destination path in zip", and I'm struggling with this for some reason, and am struggling to find examples online. Why do I need to have a destination path in the ZIP, but if I try and put a name it doesn't create a folder just an unnamed file type in the ZIP.

 

Thanks in advance for any help.


Help configuring the call library function to initialize a 2D array

$
0
0

Hello everyone,

 

I would like to create a simple DLL using LabVIEW (initialized a 2D array and return the square values in a 2D array). Then, I would like to call the DLL from the Call library function of Labview.

I can create a DLL. However, I have some troubles when I am trying to configure the inputs of the call library function.

Indeed, I do not find how to correctly set the inputs in order to allocate memory for the 2D array. As a consequence I can not test the library function because LabVIEW crash. 

 

I check the examples showing the data passing between the DLL and library functions, if I am not mistaken the examples working on the 2D array already built. Unfortunatelly, I do not find the VI which have been used to create the DLL.

 

My question is: how to set the inputs parameters to correctly allocate memory (2D array). Especially, when you want to create a new 2D array from 0 in the VI?

 

Thank you in advance for your help, 

Best regards 

 

problem allocate memory.jpg

 

 

     

Fun benchmark: modify last column in an 2D array (I almost guessed wrong)

$
0
0

I made a quick array modification SubVI to modify the last column.

Secondly, why not optimize this code slightly? And what is optimization without a benchmark?

 

Task, multiply last column with 1.000001. Do this 1 000 000 times.

paljacob_0-1599484841370.png

 

Method 1: use array functions. Method 2: use in place array functions

 

paljacob_1-1599485200897.png

 

 

So in my head "Method 2" should be the best one in most if not all input examples.

paljacob_2-1599485314769.png

 

What "Method 1" 25 times quicker?

Hmmm, I remind myself again I need to stop doing this small optimizing tasks 😄

Optimizing before finding something that actually matters to optimize, is not the way to go if you want to get more done.

 

So, then at last, what is optimizing without turning off debugging?

paljacob_3-1599485621938.png

 

Wow, in-place method won!!!!!!! 😅 

How to use a VI as a second screen? (Use HDMI or VGA port as input)

$
0
0

Hi.

I am developing a VI that allows me to visualize the image delivered by fluoroscopy equipment, the equipment has a DVI port, so we intend to use the HDMI or VGA ports of the computer. So far I have not found information that is useful for the process, and I would like to receive help from the NI community

Bug in LabVIEW 2017, 2018, 2019 and 2020: Arithmetic operation returns incorrect result for large arrays

$
0
0

The output of the arithmetic operation is not correct when performing simple arithmetic operation over large arrays.

Seems the total number of elements in the array should be larger than some number between 2E+9 and 3E+9 (probably Max(I32)=2^31-1).

The bug exists in LabVIEW 2017, 2018, 2019 and 2020, but not in LabVIEW 2016 (all 64 bits).

32-bit LabVIEW is not applicable.

 

Attached is the sample VI (for LabVIEW 2016) to reproduce the bug.

 

Instructions:

Run the VI with default values of the controls: dimension size = 1000, dimension size 2 = 3000000.

The output should be 11.

In LabVIEW 2017 and above the output remains unchanged (1).

 

When dimension size 2 = 2000000, the out result is correct (11).

 

FP_LV17-20_Bug_Arithmetics_on_Large_Arrays.pngBD_LV17-20_Bug_Arithmetics_on_Large_Arrays.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The bug still exists, when:

  1. changing arithmetic operation to subtraction.
  2. changing array data type
  3. changing operation to division with SGL data type
  4. changing array dimensional to 3 or 4

 

 

 

 

OCR training for "I" ,"-" and "."

$
0
0

I used to use ocr for the picture attached. The total content are "IM3=-136.4dBmat910.0MHz".  I attached my settings for ocr as in "Settings.PNG".  But the OCR cannot recognize "I","-" and "." .

Do there any method to solve this issue?

NI 9482 "Unsupported Module" error

$
0
0

Hi I recently purchased another relay module for my cDAQ-9178 chassis. My older relay modules (NI 9481) work fine. But the newer NI 9482 comes up with an "Unsupported Module" error in NI MAX. I also can't seem to communicate with it in Labview. I'm running Labview 2010 and it's associated NI MAX version, could this be the cause? I find it hard to imagine a simple relay module being an "unsupported device." 

 

Thanks

Ryan

How to create a shared variable that the data type is a cluster stored in a library

$
0
0

Hi all,

 

I want to create a shared variable that the data type is a cluster stored in a library belongs to the same project to keep the connection with the type def as the photo below shows.

 

The picture below show a shared variable that the data type is a Enum stored in library (CommonLLB.lvlib).

 

 

Capt.JPG

 

Thanks.


array

$
0
0

helle.   my problem is i have an array 2 D (x,y)i look for the first positive value in x.  . and after recovering  the part of my array (X,Y )from this positive value to. the rest of the array  with the corresponding Y .                       thank you 

Invalid object reference

$
0
0

Hello everybody,

 

I am trying to show/hide two boolean controls on the front panel when another boolean is activated/deactivated, i.e. if the user clicks on "MUX ON/OFF" button "SAVE THE DELAY VALUES" and "Number of Channels" controls should disappear and on the next click appear again (see the attached VI).

 

I managed to do it with just "Number of Channels" control by using a reference of this control and the Visibility property nodes in both states (MUX ON & MUX OFF). So when the programm is in the MUX ON state the "Number of Channels" control is hided because i wired a FALSE to the visibility property node. The reference is handed over to the MUX OFF state via a shift register so when the programm is in the MUX OFF state the "Number of Channels" control is showed on the front panel again. Everything fine till here. When I try to do the exact same thing with the other control "SAVE THE DELAY VALUES" I get an error:

 

Error 1055 occurred at Property Node in GUI_Emirali_final_DFA_WE.vi

Possible reason(s):

LabVIEW: Object reference is invalid.

 

I don't why the reference is not valid since I think I am doing the same thing with the other control i.e passing the reference to the relevant states via shift registers, not forgetting to do Linked Input Tunnel -> Create&Wire Unwired Cases and then going from the left register to the property nodes reference input. Can somebody see my mistake?

 

LabView Version:17.0.1f3 (64-Bit)

 

Any help would be highly appreciated.

Best regards,

Ecafer

How Intuitive Are My Icons?

$
0
0

Can you figure out what these should do just by looking?

 

Conversion Icons 0.png

Can't use "Latch when released" buttons when registering their Control referencies by Reg Events node...

$
0
0

I need to handle gui controls events by registered events. Thats why I collect all gui control references and register events for "MouseUp" and "ValueChange". Thats works fine.
However if I use button with "Latch when released", button doesn't work correctly. It keeps pressed. I know I should read its terminal inside Event structure to reset it. But I can't put its terminal inside of Event structure because my solution is based on external array of Control referencies. So I tried to use property node to read button value. However it's impossible to use Value property to read button with "Latch when released" inside Events structure.

 

Does it mean I can't use "Latch when released" buttons when registering their Control referencies by Reg Events node ???

Code example....

Deploying EXE Tools that can use System Configuration to update cRIO devices

$
0
0

I've built some tools to deploy cRIO updates, patches, config changes, etc and they work great on my development PC and when I build them into an installer, they auto include the following:

-LabVIEW runtime 2020

-NI System Configuration 20

 

with the installer and EXE loads on the new PC, but it cannot detect the cRIO devices and just produces this error message shown.  Error -2147467259 occured at nisyscfg.lvlib: Find Sytems.vi: 1750001     which is a VI from the SYtem Configuration palettes.

 

What do I need to install on the PC to get these tools to run, detect cRIO systems, deploy and restore images to them and restart all using the System Configuation tools.?

 

Please advise.

Viewing all 66787 articles
Browse latest View live


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