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

Representing Differences in Pixel Intensity as Different Colors

$
0
0

Hello, 

I have been researching how to represent differences in pixel intensity as different colors, but I have been unable to find anyone who has done this. I would corrrelate the pixel intensity to thickness of a film of oil; the thicker the filem the more intense the pixels are. Ideally, I would take a grayscale image convert it into an array, so I have the pixel intensities. Then, I would make a range of intensity that each color corresponds to and convert back to an image, such as blue corresponds to pixels of intensity 0-3 and purple corresponds to pixels of intensity 4-5. I would display the image and visualy show the range of numbers I used for each color. I am unsure how to implement this. Can this be accomplished by a lookup table? I have attached my current VI. I failed to realize that converting an image to RGB doesnt mean you get colors on your previously gray image haha!

Thanks,

Ryan


[BUG] Unable to change single numeric constant to array on block diagram

$
0
0

I was working on a VI to support some legacy C code... I attempted to change a single numeric constant into an array and it failed.  LabVIEW will flash an array icon for a few ms and then it will instantly go back to a single constant. 

 

Steps to replicate:

 

  1. Create a new VI
  2. Open block diagram
  3. Place a new numeric constant (dbl) on diagram
  4. Right click -> representation -> single (sgl)
  5. Right click -> change to array

 

Tested:  

LabVIEW 2016 v16.0f2 (32 bit) on Windows 10 64bit,

LabVIEW 2017 v17.0 (32 bit) on Windows 10 64 bit

LabVIEW 2016 v16.0f2 (32 bit) on Windows 7 64 bit

RS485 Loopback

$
0
0

I'm trying to do a loopback test with my RS485 port. I go to NI MAX>VISA Test Panel and then do a query of the message but I receive an error when I do. I wired up my port according to this knowledge base article (only the red ones). I also went to go to my attributes tab and it says the 'Is Port Connected' is not defined or supported by the referenced resource. Does anybody know what I'm doing wrong and how I can fix it? Thanks, in advance.

Generate ramp voltage and keep it constant (cRIO and NI9263 - scan mode)

$
0
0

Hi there,

I hope you will be able to help me out with a relatively simple task, i.e ramp voltage generation. 

I should control a slope in ms (10-150 ms) of the ramp signal as well. The initial value is always zero. The maximum varies, I need to control it from the front panel. And I should be able to achieve the same maximum value with different slopes in ms. So I reckon calculation of the ramping slope won’t be helpful. Well the voltage reaches its maximum value, it should be constant. And after that I resetting this signal back to zero (manually from the front panel). So I don’t need a saw tooth generator, but a simple ramp generator.

I know about the ramp_pattern.vi but by using the “ramp by samples” mode I could not achieved the desired results.  Either in terms of the maximum ramping value, or the slope in ms.

 I’ve done some research over the forum as well, but could not a suitable solution for me.

https://forums.ni.com/t5/LabVIEW/staircase-ramp/m-p/3157979

The example from this thread is quite similar to what I am trying to achieve, but at the same time, I don’t need this stairs pattern. But could not work through how to simplify the presented code.

https://forums.ni.com/t5/LabVIEW/creating-ramp-and-constant-in-combination/m-p/206980

Similar situation, but in this case I could achieve the slope and the maximum ramp signal voltage at the same time.

Hardware:

cRIO 9068 and an NI 9263 AO (AO0 node in the attached code – STL freq meas.vi – STL freq meas.vi).

This AO control code is part of my acquisition code (controlling the voltage and measuring other parameters at the same time). It works in the scan mode with a sample rate of 5 ms.

A lot of other threads focus mainly on DAQ boards or still unsolved…so, if somebody has a clue to do this simple task, will highly appreciate any suggestions. Have a good one.

 

How to Control the Sample Time for UMI 7764

$
0
0

Hi everyone,

 

I am using a UMI-7764 along with NI MAX to connect encoders to LabVIEW. My LabVIEW program measures the position of the encoder, the following error, and the primary feedback position. We are not using a DAQ to obtain the data.

 

I am running into a problem where the sample time is around 6 samples/s. My goal is to make the sample time ~60 samples/s. How would I go about doing that?

 

In addition, when I write the data to a file, the data does not seem to be matching. For example, the primary feedback position and the position of the encoder do not subtract to the following error displayed in the file.

 

I have attached my VI for your reference, along with a photo of the error in my data that I had previously described.

 

 

How to add a scroll bar that includes multiple controls?

$
0
0

Hello, I have a listbox that will vary in length and next to the listbox is an array of buttons with each button corresponding to one row in the listbox. Since they will both vary in length, is there a way to somehow add a scroll bar that will encompass both the listbox and the array of buttons? Since I want them to be confined to a certain size, yet have unrestricted length since they can very. Here is a picture of what I am describing. 

listboxwithbuttons.PNG

Any help would be appreciated, thanks!

RS485 Loopback

$
0
0

I'm trying to do a loopback test to see if I'm successfully reading messages through this serial port connection. So I go to NI MAX>VISA Test Panel to query the message. I've also wired it according to this knowledge base article (only the red wires).

http://www.ni.com/tutorial/3450/en/

However, when I go to query it I get an error. I also went to my attributes and it says that the attribute 'Is port connected' is not defined or supported by the referenced resource. Can anybody tell me what I'm doing wrong and how I can fix it?

Report Generation Toolkit to get a list of bookmarks in a Word Template and list of named range in excel work sheet

$
0
0

I want to write a VI to get the list of the bookmarks from a word document and get the list of the named range from a excel work sheet.

What VIs shall I use?


communication with Yokogawa gx recorder

$
0
0

Hi

am using yokogawa gx2030 recoder...it has both ethernet and serial port..

can anyone tell me that, is it possible to communicate over ethernet and serial port at same time through labview..

ie. i want to fetch datas from recorder through ethernet and serial port parallely

 

Thanks

NI Vision Development Shape Detection does not detect rectangles but quadrangles!

$
0
0

I need to find the best rectangle around the object (block) I'm measuring. This block can have some tolerances, so opposite edges may not be exactly parallel to each other. I tried to use the Shape Detection VI from the Vision Development Module to find a rectangle fitting around the blok but it turns out that the found quadrangle does not have perpendicular edges, but that's exactly what I need!

 

The graph output of my findings.The graph output of my findings.

In this image, the linear function represent the rectangle found. As you can easily recognise, the left edge is not parallel to the right edge.

 

 

Does anyone have an idea how to realise this?

Thank you!

Error 363513 Occurred when using smtp to send email

$
0
0

Hi,

I'm trying to send email using SMTP. I getting the error of Error 363513 An error occurred while sending data on the network. How I can solve it? I've been struggling with this for quite a while.

LabVIEW 2016

STMP server: smtp.gmail.com

port: 25

 

Plotting hystersis loop

$
0
0

Hi,

 

I am a new in LabVIEW . I want to control a power supply (BK PRECISION XLN 8018) and lock in amplifier ( PerkinElmer 7225 DSP LOCK-IN AMPLIFIER) by labVIEW. The lock-in amplifier is connected whith a photo diode and chopper.

I want to use labVIEW to plot a hysteresis loop for my sample. Could you help me how can I construct a program in labVIEW to do that?

 

 

Regards,

Thuraiya

Report generation tool kit - Word Find and replace VI

$
0
0

I am using Word Find & Replace VI to replace some texts in the doc.  It works fine on the content area but seemed that it doesn't work in the footer and header area.  Is it the limitation of this VI or Have I missed something?

A Program that somethimes doesnt work

$
0
0

Hi everyone,
I am trying to make a computer controlled measurment system, where I should control a several machines in my laboratory.. but something doesnt work right..

I am pretty new in LabView but I have managed to make it work somehow. The weird part is that it doesnt work every time... In the step 1 the program should start the discharging of a battery, and discharge it until the current drops under 0,5 A, but somehow the program just skips that part and continue the rest. It happens like ~90% of the time, every 10th time when I start a program it works fine.

My first prototype worked just fine, and than I tried to make some better GUI, and even if I didnt change anything in the loop, it broke somehow..
Please for any advices... Thanks

 

Write/Read binary files >2GB

$
0
0

Hey!

Within a data acquisition system I am trying to write a 2D array as binary file to then open it accross different platforms.

Everything was working fine until I had to deal with some larger arrays (I've noticed that 2GB seems to be the breaking point).

 

Upon writing there is no complaint from LabVIEW.

Trying to read it on LabVIEW I get an out of memory error. If I try to read one of these problematic files on MATLAB all I get is zeros.

 

I'm running this on LabVIEW 2016 64bit on a Windows 7 with 32GB RAM and I'm trying to write on an NTFS disk so I don't see what could be the problem. Has anyone run into something like this? Or am I just missing something?

 

Below I attached the VIs I'm using to test writing and reading.


LabView and myRIO

$
0
0

Hello everyone.

I am new to LabVIEW and NI myRIO. I had a question about the working of the myRIO device. When you compile your FPGA code or block-diagram on LabVIEW and run it, does the processing after compilation happen on myRIO or LabVIEW? What I mean to ask is that if I have simple block diagram where lets say I am taking the output of accelerometer and managing the speed of a simple DC motor accordingly by applying some checks using a math-script. Accelerometer is built in myRIO and the motor is connected to a PWM port of myRIO. So when I run the code is the processing being done on myRIO or on LabVIEW or both of them?

Where is the processing for the checks (in the block diagram) being done?  

 

It will be great if someone could explain it to me in simplest form possible.

Thanks.

VI Interface type

$
0
0

Hi All,

 

I have a minor annoyance with an asynchronous call by reference. The code I am calling has a type def enum on the connector pane. If I modify this enum in any way the code breaks unless I set the VI reference to strict.

 

I have a property node that is getting the VI path which now says "VI INTERFACE TYPE 2" and increments with each change I make.

 

I no longer want or need the old interface type but have no idea how to remove it.

 

Anyone have any ideas?

 

Thanks!

Resolution Issues with LabVIEW 2017 in Parallels Desktop

$
0
0

Hi, 

I'm running Windows 7 pro 64-Bit in a vm (in Parallels Desktop 12.2.1) on a MacBook Pro Retina (macOS Sierra 10.12.5, Late 2012, 15''). 

Originally LabVIEW 2016, with TestStand 2016, Realtime, FPGA etc. was installed on the vm. Now I installed LabVIEW 2017, TestStand 2016 SP1, Realtime, FPGA etc. and LabVIEW NXG.

My problem now:

All newly installed versions have resolution issues. Means, they are running on full retina resolution., but the fonts seem to have the correct size. This makes hard to work with (See appendix). LabVIEW NXG has this issue only while starting LabVIEW and showing the splashscreen. LabVIEW 2016 still runs perfectly fine.

Any ideas?

EOF Error while reading binary file

$
0
0

Hello LabView Community,

 

I am new using LabView and I have to make a program that reads a binary file. The binary file format is an String array of size 40. Every string has a reserved space of 81 bytes (Hence file size: 3240 Bytes). If I thought the reading correctly, I have to read the binary file by chunks of 81 bytes. However while running the VI I get Error 4 End of File encountered despite that the reading process has not reached the amount of bytes of the complete size of the file, Could someone tell me what I am doing wrong? You'll find the VI attached. Thzanks in advance for the answers.

to save acquired data in a spreadsheet file in labview

$
0
0

Hi to all,

 I have created a vi that i could save the string data in a spreadsheet file. However i want know how can i merge this same csv file to be used to save acquiring data, i have attached a vi to this.

and also the acquiring data is displayed in a another vi how can i merge the two vi's and then i save the both the data in a same .csv file? for example if i was using a daqmx to acquire a voltage signal from ni daq 6008 and the acquiring data will be saved in a csv file and merged into csv file with string data output

Thanks in advance,

Regards,

Dinesh

Viewing all 69084 articles
Browse latest View live


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