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

1D array into 2D array

$
0
0

Hi all,

I have a 1D array like this: (A,B,C,D,E) and I want to get an 2D array like this:

(A,B,C,D,E

A,B,C,D,E

A,B,C,D,E

.....

....)

Because there wiil be 512 rows in that 2D array, it is inconvinent to use Build Array function. Could someone help me? Thanks!


Picture zoom by mouse wheel events

$
0
0

Hello everyone,

 

I saw so many post about the topic, however, I do not find solution about my problem.

I followed the example in LabVIEW installation files and I want to try it myself using pictures I like. But there is a customized picture control and I stuck there three days. Please give me

some advises, thank you.

Please see the attached example and my test.

 

Have a good one.

FPGA - Critical Path Highlighting

$
0
0

In the following link, there is a mention of critical path highlighting in FPGA code, along with a screenshot of a debugging utility:

http://www.ni.com/white-paper/11511/en/

However, I can't figure out what this utility is. What is it?

SQL CMD answer

$
0
0

Hi, I use Labview db toolkit, but don't show the query answer in front panel.

 

I use this query with "Execute Query VI" :

 

UPDATE dbo.trc_PCBA_Linky
SET WorkOrderName='Workorder',BoxID=123,Packing_Timestamp=GETDATE(),Packing_Result=1
where [Serial_PCBA]= 'ABCDEFG1234' AND [ICT_Result]=1 AND Packing_Result is null

if(@@ROWCOUNT=1)
PRINT 'Packed!'

 

I want to get back the query answer "Packed!" How can I get back the SQL PRINT answer? 

TDMS logging from multiple loops

$
0
0

Hi All,

 

As part of thrust measurement system, I am have setup a VI to output PWM and log RPM, temperatures and power. I have grouped my read channels into different loops (mostly based on cards) and they output at rates from 10 Hz - 1 KHz. I am read trying to use TDMS advanced palletes to log this data together possibly in same .tdms file under different column headers but no success so far(as based on my reading so far it appears I need to use advanced TDMS than simple since I have mulpile data inputs). My questions are;

1. Can we use TDMS advanced  or standard version to log data from multiple loops ?

2. If so, whats the best way to setup this ? Do I setup "TDMS file open", "TDMS set file info" for each loop and first loop creates the file and rest just opens it OR should I just use this once and branch it to different loops ?

 

I had a success of logging 2-3 loops output to a single file with standard TDMS but when I added more loops it didn't work very well.  

 

I have attached a part of my VI where I am trying to get 2 loops to output the data to same file. 

 

PS: This is my first post, so please let me know if I can post additional info or use different board for this topic. 

LabVIEW: Generic file I/O error - VIs missing when loading top-level VI.

$
0
0

I'm aware of some of the other threads with this same error dialogue, but I'm not sure the context is the same as mine.

 

I'm having a problem where a previously healthy library has now stopped loading correctly. 

 

When I try and load my top-level function, I get the 'Generic file I/O error.' (see attached image).  When I dig in, I find two sub-VIs, three layers down are missing sub-vis. This is strange because all relevant sub-VIs are stored in the same library. I cross-checked the paths for each sub-VI and they are all in the right place. 

 

If I manually 'replace' the missing sub-VI (question mark placeholder) with the appropriate sub-VI from the library, the application will function normally. I can save it, and everything seems to be fine. However if I close out LabVIEW and re-open the application, the same problems appear again. 

 

Very frustrating problem and I'm kind of losing my mind. 

 

I'm assuming the fix might be to copy/paste code into a new, fresh sub-VI with a new name and link to that instead, but I'd like to understand what happened.

 

Note: as far as I can tell I am not suffering from filename length issues - I'm storing locally and the filenames are short, without forbidden characters. I am using SVN Tortoise for backup. I'm not sure if that is relevant. I also migrated this application from 64-bit to 32-bit, although this error started appearing more recently than the migration.

 

 

Is LabView the right tool to visualize Automotive CAN messages?

$
0
0

Hello,

i'm absolutely new to LabVIEW and before digging into it, i'd like to know if it is the right tool for me.

I want to analyze CAN messages from automobiles, especially unknown messages to get their meaning. So visualizing and replaying data in realtime using graphs, gauges and bit-signals would be a great help.

 

The CAN messages comes in LAWICEL protocol, just simple TSV ASCII files.

 

Maybe there are some examples i should choose?

Any help would be greatly appreciated

 

can

saving values in an array

$
0
0

Hello,

 

In this program you have to calculate the gravity force, everytime you press 'calculate' the number had to be autoùmatically stored in an array. The array has to contain all previous values.

Can anyone help me please?

Regards


Requesting single or multiple data from TCP server

$
0
0

The TCP Server VI has many variable which need to be sended to the client. But not all of this data is needed on each request. Some variables are requested more frequently compared to others. It is unnecerssary to send the all the data all the time. What is an elegant way of implementing this where the client asks for one or a multiple combination of these datasets?

 

Cluster of 8 x UNIT8 - Fuse information - 1Hz

UINT8 - Voltage - 5Hz

Cluster of 8 UINT32 - Motor speed - 100Hz

UINT32 - Elevation - 200Hz

etc....

 

Pane Size event

$
0
0

I have noticed (what seems to be) different behavior for the Pane Size event between 2013 and 2016.

 

This is the behavior I am seeing with seperate vi's on seperate machines:  In 2016, the event happens while the user actively drags the window size larger or smaller.  In 2013, the event happens only when the user finishes dragging the window size.

 

My question is: is there a vi setting that I am missing to set the window resize behavior?

Should This Generate an Error (Variant to Data)

$
0
0

So I ran into a case I never thought I would but I have some code that is taking an empty variant, and turning it into...an empty variant using the variant to data.  To my surprise this generates error 1.

 

Example_VI_BD.png

 

Now the actual code has the Reply Data Type, as a type def template that a developer can then replace and the other places that the type def is used gets updated.  But if they choose not to update the type def then I anything would be wrong since it would be converting from one empty variant to another.  Is this expected?  The easy solution is to just check for an empty variant on the input, and if it is, then use a case structure with the default data of the Reply.

 

Edit: LabVIEW 2015 SP1 f3 32-bit, Windows 7 SP1 x64

Disabling negative voltage NI PXIe-4140

$
0
0

I'm confused about the functionality of the niDC Power Configure Voltage Level Range VI -- For 4140 SMUs an input value x specifies a voltage range from -x to +x correct?

I'd like to range from 0 to +x only (disabling the output of negative voltages).  Is there an ni power configuration I can use to achieve this?

 

 

Acquiring data simultaneously from 9 sensors at high frequencies and extended periods of time

$
0
0

Hello everyone,

 

I want to start explaining that I'm really new to NI products and LabVIEW, and I am currently reading through the Core 1 Materials that a friend lent me. I am working in a project that is looking to acquire the pavement response in a currently in-service highway. To do this, a test section was instrumented with 3 earth pressure cells, 4 strain gages and 2 thermocuples. I have availble a NI cDAQ-9174 and the following modules: NI 9235 (strain gages), NI 9213 (thermocuples) and a NI 9201 (pressure cells). The sensors would go connected to the mentioned modules in the cDAQ, and everything would be controlled through a LabVIEW VI.

 

As part of some initial testing, I connected all 9 sensores to the DAQ and used LabVIEW's DAQ Assistant to get some preliminary data measurements and save them into separate TDMS files. Since I was looking to continually get 1 sample every 0.001 seconds (Acquisiton Mode: Continuous Samples, Samples to read: 1, Rate (Hz): 1000), I could not get any data due to buffer size issues (LabVIEW displayed an error due to insufficient buffer size). In the end, I could only get decent measures with only the 3 earth pressure sensors connected and acquiring data at a rate of 1 sample every 0,004 s (250 Hz).

 

Due to this, I'm guessing that I have to use NI DAQmx functions and assign a buffersize for each sensor individually, with this I could also use different sample rates for each (Thermocuples need to only get 1 sample every second). But, my main worry is that even if I do this, due to the high frequency of acquisiton and my planned mesurement time (4 hours for now), what I'm trying to do might not be reallistically possible. 

 

So, besides the needed storage for the generated TDMS files, is it possible to achieve what I want with my current equipment (DAQ, modules, etc.) and using LabVIEW, while also taking into account that in the future I might need to up the frequency to 2000 Hz and mesaure for a straight 24 hours.

 

I appreciate any help on the matter. If you can also throw in some advice o anything I should have to consider with my project, you are welcome to do so and I will greatly appreciate it.

 

Finally, apologies if I posted this in the wrong section of the board, but it seemed like the right place regarding my inquiries.

 

Thanks in advance!

LabVIEW 5 (!) Problems Building Executable from LLB

$
0
0

Looking for advice from other oldtimers on the list.  I'm working for a client to make mods to a very old test stand that uses LabVIEW 5.0.  All the files are located in an LLB.  When I run the files from the LLB, everything works well, but when I use Application Builder to make an executable, I get an error saying that a subVI is not executable.  Any ideas on how I can troubleshoot this?

Thanks very much.

OS and Network Services: (Hex 0x8ABC7021) Failed to load library. - Windows

$
0
0

I am trying to use the HTTP pallette but I keep running into this error when calling the very first function to open the handle (Open Handle.vi)

 

Error -1967362015 occurred at LabVIEWHTTPClient.lvlibSmiley SurprisedpenHandle.vi:6450001

 

Possible reason(s):

OS and Network Services: (Hex 0x8ABC7021) Failed to load library.


Complete call chain:
LabVIEWHTTPClient.lvlibSmiley SurprisedpenHandle.vi:6450001
Untitled 1

 

I looked through several threads that have a similar issue, but they all show as a problem in a Unix environment. Any ideas?


load .mat data (binary) in labview 8.5

$
0
0

Hi,

 

I would like to use Labview 8.5 to load binary data saved in .mat. I've searched in the forum but found the matlab dataplugin would not work for Labview 8.5. Could someone please help? Thanks.

Null or Invalid .NET References when vi run as subvi more than once

$
0
0
I am programming an application with a CMOS camera using LabView and the .NET framework provided by the manufacturer to interface with it.  I have a VI that can grab a single frame form the camera successfuly.  However, if i embed this as a sub-vi and try to run it more than once, i am getting a null reference returned from one or more invoke or property nodes.
 
I know you cannot run this vi without a camera the image form the block diagram and my description might be enough to diagnose what is going on.
 
vi grabs a single frame from the camera. 
vi simply runs the first in a for loop.  
 
If set to run once, it is fine. If the loop variable is changed from 1 to 2, an exception occurs.  
 
It is unclear to me why this would be occuring, unless there is something different about what is kept in memory when the subviis run own its own vs in the loop.  I do not think I have neglected to close any references, but there may be something subtle I am missing since this is the first time I am working with this framework.
 
Thank you for any assistance you can offer
frame_grab_vi.png
 
loop_vi.png

Setting properties of 'write to measurement vi' from front panel.

$
0
0

I am using "write to measurement vi" in the consumer code. I am saving data into series of file with 800k samples per file. I can successfully do this by editing the properties of "write to measurement vi" (by double clicking on it).
But I want to control these parameters (like file name and path, file format, samples per file, suffix, etc) of write to measurement vi from the front panel rather than by going to the block diagram and double clicking it again and again.
If this is not possible, then I would like to do this:
I can set all other parameters like "number of samples per file", file format, etc by configuring the write to measurement vi from the block diagram.
Then I want to supply the folder address and file name from the front panel.
I tried to do this by connecting file path control to the write to measurement vi terminal. But when I supply any file name in the file path control, it gives error: "file of this name does not exist".
Okay, I know that this is the obvious error if there is no file having the same name which I entered in the file path control.
But when I do the same thing (giving name of the file which do not exist in the folder path) by editing the property dialog of "write to measurement file vi", this function automatically creates a new file of that name (when code is executed).

In short, I want to supply the name and path of the file from the front panel to the write to measurement vi function in the  block diagram. Also, this file is not already existing in the file path. So, my code should create the new file of desired name when code is executed.

Sorry if I couldn't express the problem correctly.

My task is to transmit various signals from 5kHz to 50kHz and receive it using the same board (synchronized transmission and reception). This means that I have to take 10 readings for 4 types of signals. Which means total 40 readings. For this,  everytime when I change the frequency of the transmit signal from the front panel, I also want to change the name of the file (without replacing existing file) where the received signal will be saved. I am using tdms format for data logging. The saved files should have max 800k samples in one file (which can be done simply by using property dialog of write to measurement vi ).
I want that write to measurement vi should take file name and path from the front panel and rest of the settings from its property dialog.
Is this possible?
If no, then please suggest the alternatives.

I have attached my vi for reference.

Thanks in advance.

Choosing a DAQ for my project

$
0
0

Hi everyone, 

 

My origional plan was to use Arduino interfaced with Labview for my project but after discovering the potentional of was DAQ's could do I quickly jumped on board with the idea. I am having trouble choosing a DAQ that would be best for my project, I listed the components to my project below.

 

Brief overview of my project;

I am building a shock dynonameter which tests shock performance. In short, the control system is to start the motor and run a warm up cycle to heat up the shock being tested untill it reaches a desired temperature. Then, the motor is to be ran untill it reaches a final velocity of 16 inch/sec (I figure this linear value can be converted from the hall effect sensor finding the motor RPM). In the "testing phase", Force (from a load cell in between the shock dyno frame and the shock) vs Velocity is to be plotted so that the shock can be analyzed and tuned. I have attached an image of a shock dyno in case it helps with visualization.

 

Components;

-Varaible Frequency Drive (VFD)-This will be used to drive a large three phase motor. I would like to connect the VFD to a DAQ and then control the motor frequency through Labview. **Question: Can I output motor RPM to Labview using the frequency feedback from the VFD?** 

-Load cell sensor: This will be used to form a plot of Force (lbs) vs Speed (inch/sec). The force is the force exerted by the shock and the linear speed is to be converted to by using RPM and stroke length.

-Temperature sensor: The control system is to have two "phases" if you will. A warm up phase, and a testing phase. The temperature sensor is to be attached to the shock being tested and once a desired temperature is met, the warm up phase will be completed and the motor will turn off. After the warm up phase, the motor turns on again and the testing phase begins (this time outputing the force vs speed graph).

-Encoder: I only plan on using this if I cannot find RPM using the VFD. I figure I will need a DAQ with a counter in order to find speed.

 

I was thinking of using the NI USB-6001. It has 8 analog inputs, 2 analog outputs, 13 digital I/O pins, and a 32 bit counter. Any thoughts?

SIEMENS PLC S7 1200 to LabVIEW communication

$
0
0

hi all...

 

Im new to this labview and work on some basic projects with labview..

Currently im working on a project with seimens plc.

 

    For that at first i want to communicate between seimens S7-1200 and Labview. So anyone can please help me in moving forward with this project.

Is there any example labview program or any parameters that i have to do in seimens plc side.

 

    Basically i need to get a communication between both S7-1200 and labview software.

 

 

 

 

Thanking You

Sudhin_sudh

Viewing all 66684 articles
Browse latest View live


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