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

DAQmx Read True False issue

$
0
0

Hello,

 

I am using DAQmx Write (Digital Bool 1Line 1Point) to send out a boolean sample to a digital output channel.  I want to be able tell if the signal is high or low, so I use DAQmx Read (Digital Bool 1Line 1Point) to take the task as an input and then connect an indicator light to the data output.  The problem is the indicator lights up when I pass False to the DAQmx Write VI, and does not light up when I pass True to the DAQmx Write VI.  Shouldn't the DAQMx Read VI be outputting the same boolean as input to the DAQmx Write VI?  In otherwords, should I not get a True from the DAQmx Read VI if I pass a True into the DAQmx Write VI, and likewise for a False case?

 

See attached code for simplified example of what I'm trying to do.

 

Thanks,

Jason


Odd behavior when using units and ring controls

$
0
0

Hello,

 

Something unexpected happens when using a ring control with units:

  1. Create ring control,
  2. change representation to double,
  3. display unit label,
  4. set mV as the unit,
  5. edit items
    1. disable sequential values,
    2. add an item with non-zero value e.g. 123,
    3. OK,
  6. select the created value,
  7. create a DBL indicator with V as unit,
  8. wire the control to the indicator,
  9. run

What I am seeing in the indicator is 123 V instead of the expected 0.123 V

 

Are you guys able to reproduce this?

 

Noticed on LabVIEW 2013 and 2014, 32 and 64 bit on Windows 7 and 8.1

 

Thanks,

 

Boris

My product that I downloaded doesn't seemed to include the fuctions i need.

$
0
0

First the front apperence of labview 2015 doesn't seemed to match the toturals of that same year type as well as seems to be missing the FRC roboRio Project, as well as in the blank VI or any other there doesn't seemed to be the WPI robotics Library program file. Also when i try to open a program under the one i can open theres no robot main or anything include with that.

KE6485 Initialize.vi Driver Status: (Hex 0xBFFF0015) Timeout expired before operation completed.

$
0
0

am trying to get a reading from the KE6487, but I am receiving the following error.

"KE6485 Initialize.vi<ERR> Driver Status:  (Hex 0xBFFF0015) Timeout expired before operation completed."

 

The driver I download for this device is KE6485, but is also compatible for KE6487. Therefore I think it should not be a problem.

 

I have attached the VI I'm using for your consideration.

 

Please advice, thank you for your time

 

digits of precision limit to 3 significant digits

$
0
0

Hello!

 

I need 3 signifcant digits. If I choose 13 digits, it gives me 2 places. If I choose 14, it gives me all places. Can you please see the attached VI and help me? I need 3 decimal places. Is this possible?

 

Thanks :smileyhappy:

FFT multicore processing on several CPU sockets

$
0
0

Hi all,

I started a discussion about the limitations of multicore processing in Labview here. I do some image processing and it worked very well on an i7-3770k. I have a lot of images and there are no dependencies between them, they can all be processed separately and that's why parallelization should work very well for it. It does on the i7: The process time depends on the number of cores as expected (time ~ (1/#cores)). The task manager shows 100% for every core.

 

Now we wanted to scale that to a larger system with more cores and built a quad-Xeon system to be able to process even faster. So our system consists of four E5-4567L v2 and a lot of RAM. Each CPU has 12 cores - summed up there are 48 real cores (or 96 with hyperthreading activated). 

 

Unfortunately it doesn't work. It doesn't really scale and it is as fast as an i7. The problem might be the distribution between the different sockets - but I would like to discuss about that in general. Attached you find a minimum example of the code (it reduces the image processing to an FFT-step). Every single step of the processing is slow - so I think it can be discussed well on that simple example.

 

I do not recommend to run that VI if you don't have enough memory. But you can have a look to the graph. It shows the dependency of the process time from the number of cores used. As one can see it scales until a number of about 12 cores (remember, that's the number of cores on one single CPU) and then it doesn't improve. I really don't understand that there is no more effect by adding cores. Or maybe it's too much data for too little calculation?

 

Has anyone seen similar problems? Can anybody approve the problems with the parallelization of an FFT distributed to several CPUs?

 

We use LV2014, have to use Windows server 2008 (supports more than two CPU sockets).

database toolkit - stored procedure doesn't work in labview

$
0
0

Hello,

 

I have written simple procedure that works good when I run it from workbench but doesn't work from labview. I want to insert some data and get primary key of inserted id:

 

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`(
IN emp_id_val int,
IN project_id_val int,
IN work_mode_val int)
BEGIN
insert into work_managment.sessions (emp_id,project_id,work_mode)
values (11,1,1);
SELECT LAST_INSERT_ID();
END

 

and why that doesn't work when I call it from labview?

 

when i replace last inserted id with:

select max(session_id) as session from work_managment.sessions;

it works good in labview

 

What could be the problem??

NI-Farm: Farm server is not responding

$
0
0

Hello,

 

I'm using an example model in Labview 2014 (NI 9401 Digital Line Input and Output) with cRIO-9033. I've installed Xilinx tools (Xilinx 14.7 and Vivado 2013.4), Labview 2014 FPGA Module and Labview 2014 RT module on my PC. I've changed the target in labview project to cRIO-9033 device. The modules in cRIO are identified in labview and vi is copied in cRIO-9033 NI 9401 module. When I compile FPGA vi (Run or Build specifications) with local compile server, I obtain NI Farm error. Why am I receivinf "farm server not responding" problem?

 

Thank you in advance


Pass string from sub VI into main VI

$
0
0

I have a user event being created in a sub VI which produces a string command originating from my .NET DLL. This user event sits within a loop so that it can repeatedly act on events received - so the sub VI will never stop executing. I know that data is not passed via the output terminals until a VI stops executing, so I need another way of this event string being made available in the parent VI for processing as soon as the event occurs.

 

I have been able to update an indicator on my main VI with this string, using the method outlined here: https://decibel.ni.com/content/docs/DOC-6037

 

However, this is not suitable because I need to be able to use the string in logic (e.g. in a case structure) to decide what action needs taken. I need more than simply displaying the value in an indicator. Here is the steps I need:

 

1. Sub VI receives string via event from .NET DLL and keeps executing so that the next event is also caught (this part works)

2. Sub VI passes string directly to parent VI

3. Parent VI acts on string using case structure e.g. if the string is "Initialise", do X. If it is "Execute" do Y, and so on...

 

Thanks.

This is my 3rd post in a week - can you tell I'm new to this? :smileyhappy:

Synchronization Problem

$
0
0

Hello All,


             We are going to develop a Project on Sound Source Localization using Labview. Still We are on intial stage and going to perform all task on Software base with four mic connected with PC (For initial stage, later on going to develop using NI hardware if possible).

             Initially we acquireing sound from 4 Different Microphones connected with computer through USB. Here all microhpones acquiring sound from single sound source with some delay(mili seconds) beacuse of their different position. But this Sound data acquired by USB are not able to write to sound card simulteneously. This data of sound acquire some hold time while writing to the sound card and we are getting some delay samples while synchronizaing these all sounds. Is there any idea to reduce this hold time of sounds that writes the data to the sound card?

 

Suppose hold time 10ms, want to reduce this to the micro seconds of nano seconds.

going polymorphic switches inputs

$
0
0

Assume:

  • you have plain.vi, with the current default 12 input;/output connector, all used,
  • some of those inputs are of the type double,
  • those inputs are not required and have default values,
  • you call that VI from a LARGE number of other VIs,
  • not all of those calls connect to all of the double inputs, when calling plain.vi.

Now:

  • close LabVIEW.
  • rename plain.vi to plain-old.vi,
  • copy plain-old.vi to plain-new.vi,
  • open LabVIEW (2012 in this case)
  • change plain-new and replace one of the double inputs with a structure of two doubles (thus gaining one input),
  • change plain-old to call plain-new, filling in the one of the new structure inputs with the corresponding old input and defaulting the other double,
  • create a polymorphic plain.vi and add in plain-old.vi and plain-new.vi,
  • open a main.vi that causes (most of) the LARGE number of VIs that used to call plain to be loaded in memory.

With automatic polymorphic choice I would expect LabVIEW to chose plain-old.vi for all the places where the old plain.vi was called, and it does so.

 

What I wasn't expecting was, that in places where not all double inputs to the old plain.vi are wired, that LabVIEW would REARRANGE the wires and connect  a double carrying wire to a different input of plain-old.vi, which has the same old connector type as before!?

 

Is that to be expected?  Is there a way around it?  Would it make a difference if I had all the calling VIs in memory? (though in my case that is not possible, as I can't have all of them in memory simultaneously...)  Some of the calling VIs have constants in the diagram and I can't really tell which ones were changed or not (as I didn't write most of them)

 

 

 

 

 

Build executable application - no option

$
0
0

Hello i've LabVIEW 2014 Student version and i'm supposed to build stand alone executable application from my project. I've prepared VI properties, paths etc. To start creatting exe i was looking for Application Exe option in build specifications, but i have only source distribution choice.. Have i do something additional before this step or this is fault of LabView Version?
Thanks for your anwers.

NI XNET Signal names in log

$
0
0

So I'm making a VI that is logging incoming CAN data from an ECU via a NI 9862 C-series CAN module as well as some additional analog inputs. I'm using the XNET vi's and specifically the read set to "Signal Waveform" so it outputs a waveform datatype and I'm logging it in a TDMS file. The vi logs everything fine but all my CAN channel inputs don't have a channel name associated with the waveform like the analog channels do.  I had assumed that because you were setting what signals to read via the signal list it would automatically associate the signal name with the waveform but apparently it does not. I'm hoping there's a way to accomplish this simply at the initialization stage. Currently the only method I can think of is to convert the signal list to an array of strings and use the set attribute vi to set each waveforms name in a FOR loop but I'd have to do this each loop iteration which seems horribly clunky.

 

I've attached some example code.

 

Thanks for any help!

 

Richard

add data to end of specific line in text file

$
0
0

Hello,

 

I am trying to add data to the end of the last 4 lines of the text file attached with data from the "Array to add".  On the 4th row (the 422.5800 entry), I would like to add the first entry from the "Array to add" entry, on the 5th row add the second entry from the "Array to add" and so on.  How do I go about doing that?

 

Any help will be appreciated.

 

Sincerley,

hiNi.

Write to measurement file, adding column name in text file.

$
0
0

Hello,

Is it possible to add own column name for a text file using Write to measurement file function?

In the created file I have three different columns (I want to name them Time/Voltage/Date&Time).

 

Maby I should choose different write option like write to spreadsheet?lv.png


How can I display a charge spectrum from data acquired from an photon detection device?

$
0
0

Hello everyone,

 

I currently building an application that allows me to aquire data from a photon detector (SiPM) and display the information in the form of a charge spectrum. I am running LabVIEW and I also have a NI 2GS/s Digitizer. My problem is that I can only obtain the voltage from the digitizer and I do not know how to convert this voltage information into a charge spectrum. I am sure the answer to my question is obvious but I am stuck. Any hints, pointers, or directions would be greatly appreciated.

 

Thank you very much,

 

Ronald

cRIO 9068 cannot receive UDP multicast

$
0
0

I want my cRIO 9068 to receive UDP multicast packets from my computer.  I'm using the UDP Multicast example project included with LabVIEW.

 

The example works when I place the Sender VI on my cRIO and run the Receiver VI on my computer.  However, the reverse situation (Sender VI on my computer, Receiver VI on cRIO) does not work: the Receiver VI repeatedly times out without receiving any data.  For both situations I altered the net address appropriately as described in this thread: forums.ni.com/t5/LabVIEW/needed-software-packages-on-cRIO-for-Multicast-UDP.

 

I pilfered code for a simple UDP multicast packet sniffer from the internet and ran it on the cRIO.  It works fine when I run the Sender VI on my computer.  This means the packets are arriving at the cRIO; the problem is in LabVIEW.

 

What do I need to change for LabVIEW to receive the UPD multicast packets on the cRIO?

Use Custom Scale to Write

$
0
0

According to "What Are NI-DAQmx Custom Scales, and How Do I Use Them?" ( http://digital.ni.com/public.nsf/allkb/0464919A11C092E386256D800079C3BB), I can use a custom scale in a write operation. The attached code snippet is from a simple ramp program that worked fine until I tried to add a custom scale so that the user could use scaled units. The custom scale is created in the bottom left. There is no error until the actual write vi. I then get an error message saying the custom scale doesn't exist. Am I missing a step where you have to register the scale or something? Shouldn't the create scale vi have generated an error if it didn't create the custom scale?

How to estimate data acquisition storage requirements

$
0
0

How can I estimate the size of my data files so I can implement the correct size data storage device (like an external USB hard drive) given;

 

Measurement type: Accelerometer transduced to voltage

Frequency Range: 0 to 800 Hz

Measurement Range: +/- 10 g

Channels: 12

Sample Rate: 1.652 kS/s

ADC: 24 bit

FSR: +/- 5V

Time: varies and can vary depending on the size of the storage space

 

Below is the setup I'm considering which is a cRIO 9030 with three NI 9234 c-modules.

 

cRIO 9030 with NI 9234.PNG

 

Thanks for the pointers - John M

Force time trace select point to analyze from

$
0
0
Hi there,

I'm in the process of analysing some isometric force data looking at the rate of force development, mean EMG over the middle 3 seconds of a 5 second contraction when starting from a flat baseline. However the timing of the baseline isn't always exactly the same so the current analysis is sometimes out. I was just wondering if there was a way to select where to begin the analysis from on the force time trace, or if there is a way to work with this varying baseline.

Any help is appreciated
Viewing all 69601 articles
Browse latest View live


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