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

SubVI not understaing Main controls

$
0
0

Hello,

 

I have this LabVIEW project I have been working on in order to get more experienced with LabVIEW. The project consists of a clock application similar to those found in smartphones.

 

My main problem right now is that the stopwatch.vi works perfectly fine on its own, but when I tried to send either one of the play, pause, stop, or lap commands from the Main.vi it seems like the stopwatch.vi its not "seeing" the commands being sent.

 

Since I recently got introduced to how refnums are used, I'm thinking that may solve the issue here but everything is starting to get too convoluted so I preferred to ask here first.

 

This is still an on-going personal project so if you have any tips to make this more formal or better looking please let me know. I was thinking on adding clusters to get rid of the so many separate controls I have in the block diagram.


simulate multiple chassis in NI-MAX

$
0
0

Is there a way to simulated multiple chassis in NI-MAX?  I would like to put multiple cards in PXI/PXIe and SCXI chassis.

Viability of a web interface hosted on cRIO

$
0
0

So whilst I'm sure this is possible, before I head off down a rabbit hole I wanted to ask for encouragement or reasons to avoid...

 

I'm considering implementing a web UI for code running on a CompactRIO (9045), initially for display of slowly changing information and perhaps configuration of settings, but perhaps later for the visualization of recent data (I imagine this would require the storage of the most recent data acquired into a circular buffer, with the accompanying memory cost).

 

I'm not sure if for this I should

a) not do it

b) use a Web Service and (GET) Web Resources, along with LabVIEW-based parsing of html (I've done a very basic example of this for my build system, it works but I wouldn't consider it particularly scalable, see basic image below)

b2) as in b), but with some different HTML generation method. Not sure what this might look like...

c) use something like Node.js (either Linux binaries, or compiled on cRIO, or cross-compiled) and writing a server-side website hosting system, and then storing data from LabVIEW in some accessible format (things like settings/config and slow historical data, forming the first goal, can be stored in e.g. SQLite using James Powell's library, I already have this working).

Basic implementation of a 'website' a-la b) above:

Top-level GET VITop-level GET VI

One of several subVIs, here taking a 2D string array and producing an HTML tableOne of several subVIs, here taking a 2D string array and producing an HTML table

 

 

Feedback also on the possible performance costs of running a web server (LabVIEW or otherwise) on cRIO would be appreciated - will this cause problems with jitter, how careful do I need to be regarding that, etc.

SBRio9651-Max9276(deserializer) I2C Device Identification Question

$
0
0

(Warning for terrible English)

 

I'm trying to make I2c communication between sbrio and deserializer

 

KI9236_0-1610685316717.png

from this picture(format for read) I designed vi like 1~8

1.PNG

1=> start condition and slave address

I get slave address from below picture 

Is that XX mean 0 or 1?

so I send 8bit(7slave address and 1 write bit)

KI9236_2-1610685468852.png

Please don't consider about wait node I changed whole wait ticks according to 11.png

2.PNG

and receiving ack bit with making enable false(DO to DI)

and I changed again enable pulse to True

for the next I sent resgister address according to below table

00011110

KI9236_1-1610685425143.png

3.PNG

and another ack bit

after this without Stop bit i put repeated-start bit(below) according to datasheet(above one)

4.PNG

and again slave address with read bit

5.PNG

6.PNG

7.PNG

finally data reading and stop bit

8.PNG

 

this is host vi those array and u8-numbers are nothing

my vi only respond about read/write 1bit after slave address

and I can't get device identification

I need your help..

 

 

How to accelerate the sampling rate in the WIFI communication from myRIO to PC with shared variables?

$
0
0

Dear experts,

 

I am recently setting a mobile data transfer system, using WIFI communication of myRio.

 

Once setting the wifi environment of myrio, I have been following the easy protocol, declaring the shared variables at myRio, and read it from Host PC.

 

Since I do not use any other wifi router, and just create wifi from myrio and connect the PC to that configuration, it seems that the speed is not satisfactory for the target application (10Hz).

 

If there are some ways or tips to solve the issues of slow acquisitions, I would like to ask for your valuable advice.

 

Thank you in advance for your attention and considerations.

 

Best regards, 

 

I received ERROR when created EXE with EXCEL

$
0
0

Hi all
I created a project using lib EXCEL
It works under LV 2017
When I wanted to create EXE I got errors:
How do I fix them?

Best regards

Iskander🤔

Calling .llb file from a main.vi

$
0
0

I am trying to call .llb file from main.vi. What is the method of doing it. Tried calling the .llb file through call by reference method. I am using Labview 2016 and Vision 2016

Shift 2D Array circularly in labview

$
0
0

Hi everyone, 

 

I am trying to create a VI that can shift rows up/down and columns right/left in a 2D array. This would be easily implemented with "Rotate Array" function, however, it only takes 1D array. I was able use the MATLAB Script to the implement the 2D shift using the shift array circularly "circshift" function, but is there anyway to do it with the use of LabVIEW functions only? 

 

The VI that uses MATLAB script is attached to show exactly what I want to implement while only using LabVIEW-based function. 

 

Thanks,

S


How to split array based on insert value

$
0
0

Hi,

 

I have made a VI that took as inputs a 2D array and a 1D array.

The 1D array is the first column of the 2D array and it's an angular value.

The second column of the 2D array is the effort value corresponding to the angular value.

I implemented a VI that eliminates from the 2D array all the copies of the same angular value. (see attachments)

 

The problem is that this algorithm sends as output the first value that is different from the previous one but I want to find from the multiple copies of the same angular values which is the one that has the maximum associated effort value and send that to the output.

 

The result I want is a 2D array in which each angular value appears only one time and that is the one with maximum associated effort value selected from the multiple copies of the same angular value.

 

Can someone help me overcome this issue?

 

Thanks,

Array manipulation to find maximum value from a 2D array with repeated elements

$
0
0

Hi,

 

I have made a VI that took as inputs a 2D array and a 1D array.

The 1D array is the first column of the 2D array and it's an angular value.

The second column of the 2D array is the effort value corresponding to the angular value.

I implemented a VI that eliminates from the 2D array all the copies of the same angular value. (see attachments)

 

The problem is that this algorithm sends as output the first value that is different from the previous one but I want to find from the multiple copies of the same angular values which is the one that has the maximum associated effort value and send that to the output.

 

The result I want is a 2D array in which each angular value appears only one time and that is the one with maximum associated effort value selected from the multiple copies of the same angular value.

 

Can someone help me overcome this issue?

 

Thanks,

Best Practice for sharing lvlib across multiple projects?

$
0
0

Hi All, 

 

What is the best practice for setting up a user developed library to be used for multiple projects? I am currently working on a project where I a have developed some VI's with associated .ctl files. I would like to be able to reuse the library with other projects, but I could not find a clear explanation on the best way to do that. Most of the documentation I have read seems to warn against just copying the corresponding system folder into the new project. 

 

Thanks for the help!

Append a Table Control

$
0
0

Hello All,

 

I am trying to capture three values of a DC motor at different voltages using Labview 2020. Say 2, 4 and 6 volts record attribute A, B and C. Then the data to be presented on the first row of a table control. The first cell displaying the sample number entered in a string control followed by the data. See attached example .png. There are multiple motors to collect data for. I would like the data to be appended to the table on the subsequent rows. This is part of a much larger program. So I built a separate vi to work with. I am using random number generators to simulate the data. This vi does collect the data and present it the way I want. Adding the subsequent lines is the problem. I know I need to add a second dimension to the array using a shift register..........This is where I am stuck. Any suggestions would be greatly appreciated.

 

Thank you.

How to add Intergral control to P controller for temperature

$
0
0

Hello All,

 

I am required to add integral control to the attached block diagram,

It currently only contains Proportional control.

 

Any help would be much appreciated.

bug: LV2018 can't open type def when it has an invalid class

$
0
0

If a type def'd cluster has a class that is invalid (in my case I changed name of it when this cluster wasn't loaded), you can't r-click to open the type def and fix it! I have to open the type def manually and fix this missing class, then I can r-click and get the option.

Can't create LabView VIs from Visual Assistant

$
0
0

Create LabVIEW VI feature in Visual Assistant is not working smoothly.

 

When I try to create a LabView VI two prompts show up for 2 different files; "Find the VI Name "nirio_FindDevices.vi" and "Find the Control Name "_nirio_device_attributes.ctl". (Screenshots included).

 

After cancelling both prompts, I am taken into LabView where the block diagram is locked behind a password. I have tried my passwords and none can unlock it.

 

Both versions of LabView and Vision Assistant are 2020 SP1.

My machine is a Ryzen 4800H 32GB RAM with Windows 10

 

The VI I'm trying to create is just a simple Image Display VI

 

 

I have also tried to repair both software and re-installing but the problem persists.

 

Can anyone please help me?

 


labview 2016 installing error

$
0
0

I have newed a blank project, and tried to new a real time moudle, but failed. There is no scan mode but only FPGA mode. what is wrong with the progarm. Addtion: The labview 2016 is running on Windows 10. I have tried it on Windows 7, it works well. 

Ive9999_0-1610730035117.png

 

Visualization of TDMS file with more than 1048575 rows

labview NXG Application Build

$
0
0

I have watched all of the tutorials and am having issues getting a simple labview NXG web app deployed from my development computer to target HMI.  I am new to NXG and am used to labview application builder.  Does anybody have a good step by step for this?  Do I need to create an installer (NXG I think calls it packages) like before to handle dependencies? Also, couldn't find good info on how to set up remote access to the web server once deployed.  Really appreciate any help because didn't expect this to be difficult to set up so wasted couple days trying to do it.

How to read Buffer from dll

$
0
0

Hello,

 

I'm trying to receive data from a device with a dll. I implemented the manufacturer's dll using the Call Library Function Nodes and got several subvis. I guess the setting is pretty similar to the issue described here: How-to-use-buffer-from-a-3rd-party-dll , but I can't find a solution for my program.

 

This is my actual program:

grafik.png

 

The sequences work as follows:

1. connect device

2. Add sensor and define buffer: Here I have to provide the device with a buffer into which the data is to be written. This is an array with entries of the type int32. The buffer is divided into equal blocks, whose number and size is also defined. So I have to create a buffer for the data by passing an array of the desired size to the dll function. The buffer is large enough to hold all the data that will be collected during the streaming session.

 

The C-Syntax for this input is: VLD_addSensor(... int32_t *buffer, ...)

Unfortunately I just can define the size of the array, that has to be filled in the buffer (as shown above), but I can't give in a pointer to the part of the memory, where the array will be filled. When I try to define a pointer and connect this to the entry of my addSensor.vi (I changed the parameters from Array to numeric Pointer to Value in the CLFN) LabView crashes without any error message.

 

grafik.png

 

3. Initiate Readout and wait 1 second to fil the buffer. The wait.vi in this sequence is necessary to have enough data inside of the buffer.

4. Read buffer: This vi gives out a pointer to the starting address of the array from where I want to read the block size entries.

The C-Syntax is for the Pointer to buffer output is: VLD_readSensor(...int32_t **data,...)

 

I used MoveBlock to dereference the pointer to a single value, as shown above and described here: Dereferencing-Pointers-from-C-C-DLLs-in-LabVIEW 

When I run the vi the output parameter "Data" from MoveBlock is the same value like the pointer "Pointer to Buffer", so I guess MoveBlock doesn't work properly.

I also tried to directly dereference the array with MoveBlock, but then I either get no value for the output of MoveBlock or the error message "Access violation (0xC0000005) bei EIP=0x00007FFB951F85C7" when the input parameter for Size is too big.

 

5. Drain the buffer, stop readout and disconnect the device. This leads to no problems.

 

So in conclusion I guess the problem is that I define an array for the buffer in step 2, but no pointer to the location, so there are problems with reading out the buffer in step 4.

 

Does anyone have a good idea to solve the issue? I attach the vi, the dll and the related header file.

nidmm_32.dll nidcpower_32 niswitch_32.dll Will not load if network not connected??? Work find when Network is connected

$
0
0

Running LabVIEW 2018 SP1

daqmx 18.5

 

I have a strange problem that is likely related to company network or security settings but I'm hoping someone might have some advice.  I have a tester that is on a stand-alone network.  When the tester is connected to the network niDMM, niDCpower, and niSwitch VIs located in instr.lib work fine.  When the tester is disconnected from the network I get

 

Error loading nidmm_32.dll

The network path was not found.

 

For each of the above dlls.  I have looked through tons of registry settings and it looks like the paths are all correct and link to C:\Program Files (x86)\IVI Foundation\IVI\Bin which is where each of these dlls reside.  I can't figure out why the LabVIEW can't load the dlls with the network disconnected unless there is some secret network security setting preventing it.  

 

Any advice would be greatly appreciated

Viewing all 66970 articles
Browse latest View live


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