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

By value class store in DVRs vs By reference class using DVR as private data

$
0
0

Hi,

 

Everything is in the title, but I'll try to illustrate a bit.

I'm familiar with LVOOP concepts and I'm using both "by value" and "by refs" class but I saw recently someone use a "by value" class and store that the object in a DVR to work on it in different asynchronous process.

 

To illustrate this, I share a project with two examples:

- The first one is a by value class

- The second is a by reference class

 

I'm confused about what are the interests of using a DVR that's store an object instead of using a DVR as the private data of a class?

If I'm understanding well, with this method we lose the dynamic dispatch and cannot use directly the methods of the class... (But a property node works?! Wtf ?!)

 

Loïc.W

 


How to deal with Excel merge cells in a sheet

$
0
0

I want to decide how many merge cells are there in one sheet , as well as the boundaries and the positions of the merged cells .

 

here below is my diagram , but I do not know how to do ....

7.png

I need your help , dears .

 

 

Write to textfile function

$
0
0

I'm having an issue with 'write to text file' function the code runs but the text file doesn't appear neither on MIRIO file system nor on flash drive nor on the host computer 

New DMM FLUKE 8588A

$
0
0

Hello,

 

I´ve got nwe DMM FLUKE 8588A, where can i download driver for Labview, if there is any?

 

Thank

split string to the required pattern

$
0
0

Hi guys, 

I have an array of input string for example "P?\.?" I need to split it into an array as 

index 0=P 

index 1=?   

index 2=\. 

index 3=?

 

(I.e if its a "?" I have to store it in a different index and if its "\." I have to store in a different index.

Please help me with this?

also attached and vi which I'm working on.

 

Using scope trigger to time VI

$
0
0

Hi,

 

The question is similar to this one. To be more specific, I need help with the "end loop when "trigger condition" is met" part.

 

I have an oscilloscope connected to my computer. I'm able to control the scope from the VI and present, analyze and save data from the scope.

 

A 20 Hz (repetition rate) laser is used to trigger the entire experiment. The laser sends an electrical pulse, which triggers the scope. I'd like to start data acquisition as soon as the first trigger arrives. So, how can I check that the triggering event occurs and use that to start the downstream events?

 

Thanks!

Passing data between two computers on a local network

$
0
0

I have a requirement control a machine located in a closed room ( for safety reasons ) from a PC located at a distance from the room. 

 

The PC inside the closed room runs LabVIEW code and the required inputs for controlling it should come from another PC located outside the room. 

 

In all about 6 slider analog data + 4 digital data will have to be sent to the PC inside the room which in turn will send back both analog and digital status updates. 

 

I think this is a fit case for network shared variables. But we also have the following possibilities  and would like to know which would be an ideal solution. (The rate of data transfer is not high - one update on both sides every 50ms is good enough. )

 

1. Serial 

2. TCP or UDP 

3. Bluetooth

 

Thanks

NI-TimeSync custom protocol

$
0
0

For the last 4 years, I've been using LV2016 and the SyncLabs NI-TimeSync 1.2D15 package to synchronize my PXIe controller system clock with an external system using a custom UDP time packet.  This has provided a fairly good way to synchronize these two systems (To within a few hundred us).

 

But now, I've been asked to upgrade the test system to LV2020 and find that the custom functionality of this package has never been incorporated into the production NI-TimeSync product.  Even worse, the NI-TimeSync production functionality has been merged into NI-Sync and there's no mention of NTP or custom system clock synchronization at all in the NI-Sync user manual (It's as if NI-TimeSync has just been abandoned entirely).

 

So, I have to ask the community if there's any other options?  Can a UDP based time stamp be used to discipline the controller (LV RT) system clock in the absence of the old SyncLabs NI-TimeSync package (I'm assuming the old package cannot be used with LV2020 or LVRT2020)?

 

Thanks,


XL600


Unreadable FITS images

$
0
0

I tried to handle FITS images with the plug-in gfitsio but the image produced by the example.vi 'does appear to be a FITS image' according to ImageJ.

Does anyone already had this problem ?

Thank you for your help.

Analogue Output Module

$
0
0

Hi all,

 

My VI is connected to a NI module that  is an analogue output and has a range of 0 to 0.02A.

erabrannan_0-1599662892406.png

 

 

Therefore, I can only input values within that range or it gives me an error.

 

My analogue output NI module is connected to valves that open or close when the user inputs a value from 0 to 0.02A.

 

However, I have been asked to change the input values into percentages instead.

 

For example, an input of 0% is 0A and an input of 100% is 0.02A.

 

 

bear in mind that I tried to change the control to percentage through the advanced editing mode and as I suspected any time I put a value higher than 0.02 it still gives this error.

 

I would appreciate any help thanks!

 

emilie.

 

 

Dequeue Message.vi blocking and not timing out.

$
0
0

Hi.

 

Long story short: I have a SubVI (CoG.vi) based on the NI QMH template and at some point the Dequeue Message.vi in the processing loop is blocking while having its Timeout input wired to 50ms without generating any errors. I spent hours trying to understand what can cause it, and surely I'm missing something dumb but I can't figure it out...

 

It's very tricky to share any any code as I would end up sharing almost the whole project for it to work, but here is a summary of my problem: 

  • Two VIs at stake: main.vi and CoG.vi. Main is calling CoG under user request and isn't blocking Main (takes 1 input, has no output)
  • 4 loops: Event, Control, UI, and Trigger loop (this one regularly send a "request for update" message into the control queue) 
  • 4 Queues:
    • Control and UI Queues (created, managed and released withing CoG.vi)
    • Main WifiComms Queue (Created and released in my main.vi, wired as input to one terminal of CoG.vi and is used to communicate Commandsfrom CoG to main.vi
    • Platform Queue (created and released in main.vi, named queue as in it is not a threaded inout to CoG.vi but is called by it in the init process, serves as Data transfer from main to CoG.vi. I was talking about this in this Thread.

Here is the general idea: 

- When called, CoG.vi inits Control, UI and Platform queues and starts the different loops.

- The trigger loop sends the message "Update Attitude" in the Control Queue.

- Control Loop dequeues it and send a message with an appropriate command into Main WifiComms Queue and "awaits" an answer from Platform Queue (Timeout of 0 ms, will read next iteration if empty at the execution)

- Main.vi dequeues this message, process the command and then sends back appropriate data over the Platform Queue (via a data management loop)

- CoG.vi receives this data and process it accordingly.

 

All of this goes fine and you can see it in the following screenshot:

The CoG.vi

VinnyLaTaupe_4-1599671058071.png

 

 

The main.vi comms loop:

VinnyLaTaupe_1-1599668839362.png

 

 

Now, whenever I click on the Lasers Button for instance, for some reason the Dequeue Message.vi in the Control Loop will block. It won't generate an error (I know, I don't have any error management yet, but I checked) it won't timeout. In debug mode I can see the green arrow showing that it is executing.

 

After clicking on the emergency button, this one sends a command directly to the Main WifiComms Queue (not the control queue) which, for some reasons, suddenly unblock the Dequeue Message.vi in Control Loop and starts dequeuing all element in the queue.

VinnyLaTaupe_2-1599669333927.png

 

I have thought of various possibilities causing this:

  • problem of non-reentrant execution in the Dequeue Message.vi
    But I'm using only this one in this library so Idon't think so (+ it is executiong according to the debug mode)
  • I'm using a lot (?) of queues and some of them (The data ones) are actually taking in arrays growing over time. Could it be that I have a memory issue? But then why an "external trigger" would suddenly unblock the Control Queue? Also, this happens quite early after starting my program (As I'm testing it) so the arrays don't really have time to get big...

 

I really don't get it...

Am I missing something obvious you could help me with or is it something more complex I need to dig in?

I'd like to point out that while not a complete beginner, I am lacking experience 🙂

 

Thanks a lot in advance for any help.

Vinny.

Privately Scoped Post-Build Action VI

$
0
0

Hey all,

 

So I've recently started restructuring my projects to be like what the first image shows. It's so succinct and neat looking, and because everything is privately scoped, I can be sure that there are no cross dependencies between projects. Well that's all well and dandy until I realize that my Post-Build Action VI (second image) can't be privately scoped. Which really sucks. Ruins the neatness completely.

  

Capture2.PNGCapture.PNG

 

I might make a suggestion in IE to allow privately scoping of Pre and Post-Build Action VIs, but I feel like this is something that would be fairly hard to achieve. But in the meantime, what would y'all do to keep things as neat as possible? Here is what came to mind for me:

 

1. Change SubVIs Virtual Folder's access scope to Not Specified, keep all private except the PBAVI:

FireFist-Redhawk_0-1599685618424.png

 

2. Make Public and Private Virtual Folders inside the SubVIs folder, with each sub folder scoped appropriately:

FireFist-Redhawk_1-1599685735694.png

 

3. Change the Documentation Virtual Folder's access scope to Public (because what does privately scoping documentation do anyway, it just looked even neater with literally everything privately scoped) and add the PBAVI to it:

FireFist-Redhawk_2-1599685902739.png

 

4. Something else that I haven't thought of yet.

 

I'm probably being excessively picky here, but this is something that will be the same across every project I own. They all have a PBAVI. So I kind of think I need to be a bit picky about it. Anyway, as always, any thoughts/ideas are appreciated. Leaning towards option 2 at the moment. But again, in an ideal world, I'd be able to privately scope the PBAVI to eliminate the possibility of cross dependencies.

Is this the right way to think about Actor hierarchy?

$
0
0

I'm looking for critique of my Actor hierarchy pictured below.  I'm new to this so I'm quite sure how to think about it.

My plan:

Application Module (root actor).  - Loads application configurations, launches nested actors(blue), waits for user input from Main Menu 

Main Menu - Choose what test to run, as well as hardware type (real of simulated).  Launch Nested UI for the Test.  Wait for input from Test Controller

HAL/SAL - Launch and monitor hardware nested actors (Full disclosure I just learned what HAL stands for and I'm not sure I'm using this term correctly)

PXI - Do PXI things, launch and monitor nested PXI Slot actors

 

CDuck_0-1599688046377.png

 

Please advise! Even just a link to a good break down of how to think about Actor hierarchies when used for hardware testing would be appreciated.  I've tried to find some examples but I haven't had much luck finding a collection of them that would lead me to discovering common patterns.

 

About the article "Timing and Synchronization Features of NI-DAQmx"

$
0
0

While using the smple "Synchronized Analog Input/Output",I could see the input measurement at the front panel.And now I would like to see the output measurement at the front panel .Trying to plus the measurement to output channel at the block diagram didn't work at all.

How to let the output measurement work?(In block diagram)

 

Thanks for help.

 

 

spreadsheet fail to append

$
0
0

benana_0-1599711941368.png

everytime it runs when append is true the value doesnt go in, when it is false it goes in


Measuring Phase between reference sine wave and a repeating burst signal

$
0
0

Hi there,

 

I have two PXIe-5110 modules with all four channels measuring a 50 Hz repeating signal which is essentially a square burst of pulses. The image on the left is the 50 Hz burst and on the right is the magnified signal looking at the pulses within the burst. These bursts shift in phase relative to a 50 Hz sine-wave.

 

I am trying to trigger the PFI ports off of the reference 50 Hz sine wave and then measure the relative phase of the burst signal as shown by the green arrow in the left image. I am new to LabView and could use some guidance as to how best to implement this goal.

 

Thanks!

 

 

Firing signal.jpgFiring signal magnified.jpg

I would like to know how i can best measure the phase difference between a 

Search for used VI from palette

$
0
0

Hello everyone,

 

I programmed some code a few years ago where I used a specific VI from the built in palette ('Flatten to XML') and want to look at the VI. The VI is stored in a project >100VIs and I am not able to find the right VI based on my naming.

 

I know that I can search for VIs that I created and are used in the project , but it does not search for the 'built-in' function. I tried both names for english and german (since the UI is in german).

 

Is there a way to search for used 'built-In' VIs?

[Game] Could this can be written using LabVIEW??

$
0
0

Hi LabVIEW Community,

 

This came to my mind today. I've recently saw a bunch of examples manipulating Object,Textures,light,meshes,shadow,rotation....etc (OpenGL?), and this, combined with plenty of math functions and inherently parallel programming can be used to "unusual application" using G. For me, LabVIEW is much more than one Programming Language Smiley Very Happy

 

I got two project's recently, but i want a third 'fun' one (Just to spend my time with something useful instead procrastinating on facebook/games Smiley Very Happy). I'm wondering if the 3D Picture Control could be used to write a REAL game? For example, on Client, load simple sprites on 2D/3D scene, the game physics and everything related into game experience (User Interface for example). On Server side, deal with players account management, connection handle (TCP), scriptable elements (Using LUA) , game mechanics and so on. My idea seems one medium~big project... So, the AF is the best choice?

 

I hope some detailed answers and i apologize if something was 'miswritten' here (I'm not native or good english speaker).

 

Thanks for your attention.

-------------------------------------------------------------------------------------------
"In theory, theory and practice are the same. In practice, they’re not."

I have been getting datafinder error since 2-3 months when I reboot my computer.

$
0
0

I have used LAbview quite some time back. I don't have a memory of how it started but somehow I get the error mentioned in the snap whenever my computer starts. I am getting some errors in python now related to server. I somehow feel it is linked to this error. Could someone help me resolve this error.

linspace in labview

$
0
0

how to create linspace in labview?

Viewing all 67331 articles
Browse latest View live


Latest Images

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