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

Producer/Consumer Best Practice

$
0
0

So I have been using LabVIEW for a few years now and still have a relatively simple question. I have posted three examples below and am wondering what is the best practice when it comes to using the Producer/Consumer with a Message Queue architecture. My gut tells me to always do it like Example 3, but I don't know why exactly. Maybe they are all the same until you get to a certain level of complexity. Any documentation you can point me to is much appreciated.

 

EXAMPLE 1 - Control Outside Event Structure, passing message only and use the control to update the indicator. 

 

Example1.PNG

EXAMPLE 2 - Control INSIDE Event Structure, still only passing a message and updating with Local Variable.
Example2.PNG

EXAMPLE 2 - Control INSIDE Event Structure, Passing message AND value from Control, unpacking it inside the consumer loop to update the indicator.

Example3.PNG


Developing LabVIEW without Windows 10 OS Admin Rights

$
0
0

Our IT department is transitioning us from Win 7 to Win 10 OS. As part of the update, we will no longer have admin rights to our PC's due to security reasons.

Some of you may have already gone through this and found some answers. One answer that is not acceptable of course is to give all the engineers admin access.

I am thinking we can work a way out to install LabVIEW and the Tool Kits (and VIPM,...).  These can be well known and on a list that IT can track.

What I am also concerned with is running various test executables that we make.

Does anyone have some helpful feedback for me?

NI USB 7856R

$
0
0

Hi all,

 

I installed Labview 13, FPGA module 13, MAX 15 and RIO 14.

I have connected NI USB-7856R DAQ. According to MAX, the device has been installed successfully. However it is not detected in the Labview. Please let me know what may be the possible reason for this.

Thank you

 

Regards

Pratik 

Anyone else seen this?

$
0
0

Running LV2018 and TS2017.

Started up TS and opened a sequence that had some vis in it.

And then this (see below).

A reboot solved it, but it definitely had me scratching my head.strange.pngstrange2.png

find all serial ports on PC

$
0
0

We have a laptop which has connected to it a powered 4-port StarTech USB hub.

These USB ports generally show up as COM21 to COM24 but not always. 

We have instruments connected to these ports that we can query.

 

The brute force way is to start at COM3 and go through COM30.

 

But is there a more efficient way of finding all the serial ports such as reading Windows registry etc?

 

 

Attempt to remove ALL NI products from PC - LV2018/NXG 2.1.1

$
0
0

Hello,

 

I try to remove all NI products from a PC (I try to avoid Windows clean reinstall if possible!).

Windows 7 x64, LV2018, NXG 2.1.1, NI device drivers.

I go to Windows "Remove programs" menu, and select National Instruments software. Then I selected all items in the list in the spawned "NI Package Manager". I started to Remove all. A dialog asked me for a reboot, I did.

What is strange, that NXG still on the PC installed, and I can even run it / use it. However, it does not appear in the NI Package Manager list, see screenshot! Question: how can I remove/uninstall it???

 

edit: Package Manager version: 18.0.2, updated!

 

bug_unistnall.png

Chatting between two computers using FSK modulation

$
0
0

I want to build a chat application so that two computers can transmit text to each other using FSK modulation. But I have no idea how to start with for a dynamics text data transmission. Both the computers should be able to send and receive text messages like a messaging application.

Please help/suggest how to proceed ?

Any help is greatly appreciated.

Thanks in advance!

Boolean to (0,1) function: why the I16 output?

$
0
0

Hello,

 

Just out of pure curiosity, what is the reason behind that the Boolean to (0,1) function has an output of I16? Bools are stored as U8 in LV recently. Is it for some kind of backward compatibility? As I remember, I read somewhere that in some old LV versions, Bools were stored on 16 bits, not as now on 8 bits...

 

edit: and why it needs to be signed? values 0 and 1 does not require sign...

 

Example_VI_BD.png


Arduino push button to LabView LED array

$
0
0

I am working on tictactoe game played using an arduino and viewed in LabView. 

Can i connect 3x3 button (Digital pins) to LED array on LabView?

Concurrent access to TDMS file with interleaved data and only a single header (no file fragmentation)

$
0
0

Hi,

 

I'd like to write interleaved data to a TDMS file, and at the same time (in a separate loop) read that data back. This is similar to what the example "Concurrent Access to TDMS File" shows, however the main difference is that the data is interleaved. Data is written a single value at a time, to multiple channels across multiple groups. This is similar to how a CSV file would be written, with a column per channel and data written to the file a single row at a time.

 

The problem with this approach is that using the standard TDMS functions causes the TDMS file becomes very large, and the index file is a similar size to the TDMS file. I.e. the file is fragmented. I'm aware of this issue from previous projects, and it is discussed here in more depth: https://forums.ni.com/t5/forums/v3_1/forumtopicpage/board-id/170/thread-id/811943/page/1 . Despite the one header only feature being enabled by default, it only works properly in a very narrow set of circumstances. The solution I've used in past projects is to use the advanced TDMS functions to create the file, write the header data information once, then write the interleaved data using the advanced synchronous write function. This has worked very well, resulting is very efficiently packed files that are fast to write to, can use different data types across multiple channels and multiple groups.

 

However, when trying to perform concurrent TDMS access, the read loop must also use the advanced TDMS functions. The advanced TDMS synchronous read function returns the data, but it appears to be raw/interleaved. I.e. the read function is essentially useless, unless you are prepared to re-implement the standard TDMS read code in a subVI to decode the file yourself... More information about that is in this post: https://forums.ni.com/t5/LabVIEW/How-to-use-TDMS-Advanced-functions-properly/m-p/2053854#M669302 .

 

To play with these conecpts, I've modifed the concurrent TDMS example (See attached and below):

 

Test - Concurrent Access to TDMS File.png

 

Observations:

  • Advanced TDMS write can only be read by a standard TDMS read after the file has been closed, not concurrently.
  • The Advanced TDMS read always reads in data raw (underlying file format), regardless of being concurrent or read after the file was closed.
  • The standard TDMS write can be read by the standard TDMS read, but:
    • The write must be set to interleaved, otherwise data read back is still interleaved (channels mixed together).
    • With a write mode of decimated:
      • The read loop only returns correct data if no channel properties were written (no header), and the last run of the VI was with interleaved mode or decimated that returned correct values. Perhaps this is a bug in the TDMS functions?
      • The read after the file was closed always returns interleaved data.
  • Standard Interleaved writes always work, however the file is fragmented with very large index file.
    • For example, 10,000 values per channel in the attached VI returns a 1944kB file that defragments to 313kB...

 

I can't see any way arround this problem, other than using the standard interleaved writes and defragmenting the file after closing it. I'm only writing a data point every 1 or more seconds, and to approximately 100 to 1000 channels spread over 5 to 10 groups. So write speed isn't an issue, and the temporarily fragmented TDMS file shouldn't cause problems. It's just not ideal.

 

Does anyone have any better suggestions?

 

Thoughts/ideas regarding TDMS:

  1. Is there a way to deinterleave the data as it is written, producing a file with sequential channel values?
    1. See the double array shift registers in the write loop of the attached VI: If I was doing this in memory, I'd preallocate an array per channel, then replace each value as it comes in. Is there a TDMS equivelent? If not, is it a feature that could be added?
    2. For a TDMS file, I imagine that would require either preallocating the file on disk (TDMS reserve functions), or by having the TDMS file add fixed length blocks (where channel length is known) as the file expands. I'm aware that TDMS can support this, and does that when writing large waveforms to disk.
  2. TDMS as a format:
    1. One advantage I see for using a TDMS file is that it can directly replace common formats like CSV, with the benefit of more efficient binary storage (in some cases the underlying TDMS file structure can be made to look like a binary version of a CSV, when using the advanced TDMS functions). This is overall good.
    2. Compared to other formats like HDF5, TDMS lacks flexibility in it's structure. I.e. everything is a 1D channel of data, with limited hierarcy. The tradeoff that I can see for this reduced structure is that you get the benefit of efficient high speed streaming, and minimal file fragmentation when doing so. I.e. TDMS works really well as a living file with large volumes of data being constantly written to it over time.

I'm a little disappointed that this use case of TDMS (mimicking a CSV file with columns of data written row by row) cannot work with concurrent reads while keeping the file structure clean.

 

Gabriel

 

Erro -90010 Mathscript

$
0
0

Quando vou rodar um código no nó Mathscript aparece o erro mostrado na imagem. O que significa isso, já que na referida linha do meu código principal não há qualquer função que exija um escalar, há somente um while loop....image.png

Basic VISA/TCPIP problem

$
0
0

Hello everyone,
I would be happy to get help with sending SCPI commands to my "E8251A" signal generator.

The device is configured in NIMAX.
I connected via TELNET to my device and sent SCPI commands to check the communication and the responses of the controlled device and everything works fine.
I would be happy if you could help me how to create a simple code to send one command to the signal generator with an answer or no answer.

 I attached a photo with a code that I saw on youtube but it doesn't work ....

Thanks,

Matan

I want to acquire a large number of samples consecutively with analog discovery 2 using LabVIEW

$
0
0

We would like to obtain signals with analog detection 2 using LabVIEW.
However, we can collect only 8192 samples at present.
How can I take more samples?

Vision Assistant scripts to Vision Builder AI conversion

$
0
0

Hi Everybody,

I started a project to move from using Vision Assistant express vi to Vision Builder AI, I hope somebody already did this step because I have some questions:

1) Is possible to convert the scripts saved in Vision Assistant to Vision Builder or to import it? I'm searching a way to don't have to do that manually since the tools are almost the same.

2) Is possible to integrate the Vision Builder interface in a labview project? I would like to just display the program in the main HMI instead of open Vision Builder like a separate program.

 

Thank you!

controlling a maxon motor with labview!

$
0
0

Bonjour à tous,

Je suis nouveau sur Labview et je travaille sur un projet en robotique. Je dois contrôler quatre moteurs maxon DC à l'aide d'une carte électronique de NI SCB-68A et une carte ESCON 70/10. Mon problème est que je parviens pas à combiner les deux cartes avec le logiciel Labview.

Cela fait pratiquement quatre semaines que je suis sur le projet mais je n'avance pas, j'ai vraiment besoin d'aides.

Bien cordialement


How to separate the overlapping particles ?

$
0
0

Hi,

 

I am working on project in which I have to detect each cell into the sample and have to make bounding box onto the detected cells.

 

but I am not able to separate the joint cells and the VI is detecting three or four joint cells as a one cell and makes bounding box onto them, so I need help into separate the joint cells.

 

I have attached the VI and result image for better understanding.

Combining data and table display

$
0
0

Hi,

 

I am new to LabVIEW and have been given a project where I must collect 1 voltage reading, from a pyranometer, and several thermocouple readings. I am having trouble combining the two different data types.

 

Ideally, I would like in Excel a time, voltage and temperature column but I cannot output the data to one file where the data is collected a the same intervals.

 

I've tried combining the DAQ 1 and 2's outputs together into the 'Export Waveform To Spreadsheet File.vi' but this brings up an erro.

 

Can voltage and temperature data be combined like this? How can I do it? 

 

Thanks, 

Euan

How to trigger from DI

$
0
0

My application triggers from a DI from a PLC, the duration of the "high" signal is 15 seconds.  I have this signal tied to a case structure to trigger data collection of AI data.  The problem i'm having is i can't control the duration of the data capture, in other words i may only want 5 seconds of data to be captured.  The current state of the code allows me to capture for a duration less than 15 seconds, but once the duration is over the signal is still "high" so it just creates another file.

 

How do you trigger from just the lead edge of the signal and ignore the state after that?

NI Days events in USA in 2018?

$
0
0

Hi folks -  Does anyone know if there will be NI Days events in the USA in 2018?

 

Thanks,

Joe Czapski

 

FPGA on NI-9145: compilation error

$
0
0

Hello,

 

I use Labview 2017 in order to deploy FPGA code on a NI-9145 Ethercat chassis through a PXIe-8880 controller.

Recently I added a different NI-9145 device, since we are planing to expand the EtherCAT network. Since then, I am facing compilation errors due to memory issues. Apparently the compilation cloud needs memory on the development computer in order to place the FPGA code. The error I get after ca. 20 min. is:

LabVIEW FPGA:  Some of the compilation steps were not executed.

Time (s): cpu = 00:01:10 ; elapsed = 00:00:36 . Memory (MB): peak = 3916.988 ; gain = 0.000 ; free physical = 23933 ; free virtual = 0
INFO: [Route 35-416] Intermediate Timing Summary | WNS=1.228  | TNS=0.000  | WHS=N/A    | THS=N/A    |
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

 

 

For some fancy reason, compilation works normally (and pretty fast) on a virtual NI-9145 in the existing EtherCAT-Master. FPGA compilations abort however if I place the VI on the FPGA target of the real, physical NI-9145.

 

Any help is welcome

Best wishes Smiley Happy

Lysandros

 

Unbenannt.PNG

 

Viewing all 66676 articles
Browse latest View live


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