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

Use Multiple DLL file in Lab view.

$
0
0

Hello,

First time I am working in lab view. I need some guide line for learning lab view and some direction. we are manufacturing scientific device and which is control by our application. Our application is created in Qt and C++. Now we want to create the lab view application for controlling our device. 

which is good way to create the lab view application?
1) Is it good to create the lab-view code separately.  OR
2) Is it good to call .dll file from lab view.

      ( note: I am using our own code with Qt core library. So single function is calling           to multiple library)


if you agree with second option then:

 1) How can I load the multiple DLL for calling single function?

 2) Is it any way to load all DLL file once in project and use it multiple place?   

 

Sorry, if it is silly question.

Thank you.
  

 


Modbus is Simens V20 Inverter communication

$
0
0

Hi Everyone,

 

I have used LabVIEW a bit however my knowledge falls apart with Modbus.

 

I would like to control a simens V20 motor using Modbus RS485 2 wire.

 

I am using a cRIO 9045 to do this (no not a NI USB rs485).

 

I have established connection! I also can write to registers and see them update on the front panel. Terminating resistors being used and all.

 

However i cannot turn on the motor! Been working on this for 2 weeks with no joy.

 

To setup the inverter in modbus mode i have followed the v20 example modbus document on page 13. (CN011 setting, just puts it into Modbus mode)

 

Notice on the same document the first few pages show the control word STW. This is used to control/ turn the motor on and off. The register for this is shown on the other document (Inverter manual) if you scroll to the register table page 178. it requires that you send Hex 47E (get ready) then Hex 47F (Run motor). (More info on STW Page 17 modbus example).

 

I cannot write to this register as i get an error from the modbus API (see attached).

i understand writing to registers, however for safety i think the inverter needs a constant modbus connection. Should connection fail the motor turns off. This is (im guessing) what simens means by cyclic communication and is not described in depth in the manual (not really designed for labVIEW) "All drives of the port are to be operated cyclically, one after the other." page 7 inverter manual

 

Is it possible that the normal write command just wont cut it and recieves this error code?

 

Does anyone know why i get this error, or any ideas on what to try?

 

Thanks in advance, the help is very much apreciated!

 

Daniel

 

myRIO wireless

$
0
0

I am not able to change the wireless mode on the myRIO in order to create a wireless network. I attached photos of my configuration page. 

Need Help Creating a Student Attendance VI

$
0
0

https://www.youtube.com/watch?v=L-Qd3X5d9G8&t=154s

 

This video is similar to what I would like to create. 

 

I will simulate this with a push button to say that the student is present in class. I would like it to show the time and date that they attended and be able to see how many days was missed. 

Deleting elements from a 2D Array

$
0
0

Looking to do some data analysis on a dataset i'm capturing and got jammed up on the first step.  

 

I have a 2D array of (Z) height data where (X = rows) and (Y = Columns).  I actually get data for (1800) rows by (400) columns, the total array size is (7107 x 400), everything from row (1800) to (7107) is ZEROES.  I'd like to delete the ZEROES.  i tried delete from array and subset array VI's but i can't figure them out.  They don't do what i think they should do, i don't understand.  What i did learn is that delete means turn data into ZEROES, in other words the array size is not changed i can manipulate the data but really need to just change the size.

 

Anyway are there examples on how to do this?

DAQmx not showing up even after driver installation

$
0
0

Hey everyone!

 

I need to use DAQmx to read data from an ethernet chassis. 

I installed the DAQmx driver and rebooted the computer after. 

However, DAQmx pallette is still not showing up in LabVIEW.

The driver was installed completely and the computer was rebooted. 

 

Please suggest the steps to make DAQmx show up in LabVIEW. 

Pulse generation

$
0
0

Hello.

I want to make a program to generate pulse for driving stepping motor.I was able to meke proguram to generate the output waveform.Then I am in trouble by outputting a waveform. I made a proguram by using DAXmx(Sample cloak and analog1D DBL 1Channel N sample ,etc) .But Error code 200462 is displayed on DAQmx Start Task.vi:4  when executed this program. Also, the waveform is created untill halfway. There is written that the output buffer is empty.How can I solve it?

I am using the multifunction I / O device of NI USB-6211.

Please give me an answer.

FPGA DRAM Performance drop of Reading while Writing

$
0
0

Hi There, I'm working on FlexRIO 7935 with 1483, and I want to use the 2GB DRAM on FlexRIO as a large, real-time updating ring buffer, here is my plan.

 

The DRAM will do reading while writing, and the write speed is maybe 1/5 of reading speed. (the ratio can change, of course).

 

I write to DRAM in such fashion: address 0 to 255, 1024 to 1279, 2048 to 2303, and so on, at 2nd second I will write to 256 to 511, 1280 to 1535 and so on. Each segment means a image frame. I have to repeating the process to fill the total DRAM, and after that I will start from address 0 again, while DRAM reading is ongoing.

 

I read DRAM in sequential style, and at the end of DRAM it will repeating reading from address 0.

 

Here is the question, in my imaging such operation should have a relative high performance, since most operation is kind of sequential, but how much will we suffer from the R/W switch overhead?

 

I checked the user guide, the DRAM have a bandwidth of 10.5GB/s, if don't count the overhead, my application can work smoothly at 4.3GB/s reading. 

 

So is there anything I can do to improve the overall performance?  Any suggestion?

 

Thanks!


DLL calling problem

$
0
0

Use the following DLL file.
When you program as shown in the picture, other functions function normally and display the value.
However,

 

typedef struct {unsigned int channel;
                                     unsigned short pbuf [128];
                                     unsigned int len;
} lv_data_cb_params;

It does not work.

Programs and photos will be uploaded.

I do not know if pbuf seems to be a problem.

 

 

 

SAME PROGRAM/ALGORITHM BUT DIFFERENT BEHAVIOR

$
0
0

New to LabVIEW here, first time posting =D

I developed an automated measurement system [accuracy in ppm] by using GPIB as a communication media with all the instrument.

The algorithm works fine and the data collected are acceptable on my laptop (win10 32bit).

But when I built an executable file and run on a DESKTOP(win xp 32 bit), most of the measurement data collected were totally different. The algorithm is the same but how come there's so big difference on the results? I did use GPIB isolator to prevent ground loop.

Did anyone have idea about this issue?

Thank in advance.

 

linlin0904

continuing an array auto index after a while loop has terminated.

$
0
0

I have a nested while loop that runs for a number of iterations less than the number of elements in my array.

How do i ensure that on the next pass of the while loop the indexing continues from where it left off rather than going back to the start of the array every time?

Thanks!

Conditions in labview with myDAQ

$
0
0

Hello everybody,

 

I have a program but it is not work like i want it. i attach my program.

My problem is that I don not know how can i do time measure between 2 high digital input. I want the first one (exactly Digital input 0) start the measurement and the next pulse (exactly digital input 1) is stop my measurement. Furthermore I want the analog input save the actual position when it is get only one sign from digital input 0 but the loop should be stop when the elapsed time is measured.

Thank you for your answers.

Interface + functions in C for new control

$
0
0

Hi,

I am wondering if there is an option to write new control(graphic + functionalities) in Ansi C, and add it as a full-functional control in LABView.

Anyone did a such of thing? Maybe some example or .lib?

 

thanks for any answers

 

 

 

 

 

Equivalent to VISA "Find Resources" for DAQMx devices in NXG 2.1?

$
0
0

Is there an equivalent to the VISA "Find Resources" VI that I can used to get a list of all connected DAQMx resources in NXG 2.1? I can see and select my DAQMx resources as constants / from the front panel, but I'm just looking for a programmatically accesible list of these devices (currently a 4-slot cDAQ chassis and 4 modules, if that helps?).

 

Any help is appreciated! Thank you!

Entered Text is Cleared When Selecting New Tex tBox

$
0
0

Hello - 

 

I have a program that I am currently using as a test reporting software. Meaning a user will grab a PCBA and perform a few functionality tests, put in some information regarding the board (Serial Number/MO Number), and their initials. When they are done, they press enter and the info is sent to our report database. 

 

A problem arises when users are entering their initials,the serial number, and MO Number. At random it seems, after the user enters text in one of the boxes, and they click away to enter more data, what they entered disappears. This problem occurs in all three fields that the user can input their data. 

 

I have uploaded the current VI I am using. Please excuse the lackluster programming, I only have a few weeks experience with LV and plan to revise this code for future use. I just threw this together with limited LV programming knowledge. 

 

With how my VI is now, are there any obvious reasons as to why this happens? 

 

Also, this was written in LabVIEW 2016 32-bit with the LabView 2017 Runtime Engine SP1 f3. 


Can't load packed library after reinstalling windows

$
0
0

Hi All,

 

I've had a google about this issue but unfortunately I can't quite find anything that matches it. Last week my laptop crashed and our IT support team had to completely reinstall Windows. I've just about got all of my old programs and addons reinstalled now but I'm having one issue using a packed library that I built prior to the crash.

 

When I try to add a subVI from the packed library to a new block diagram, I get the following error:

 

LabVIEW error 0x625.png

 

All VIs that use this packed library all load with broken wires now as well. It's weird because I built the library using Windows 7 and that's the operating system that I just had reinstalled. Any ideas? 

 

Thanks in Advance,

Dan

 

 

Dynamic dispatch recursion shared clones error

$
0
0

This may be super obvious, but I'm missing it. Why doesn't this work:

I have a base class with a dynamically dispatched member VI which takes an enum and calls itself to build up a string (possibly not a great way of doing this, but disregard for the moment). A child class inherits from this and overrides the action on one of the values, but calls the parent method on the others. When I attempt to run this VI with an enum value that causes recursion (in this case "Nested 2"), I get error 0x412 / 1042. Also happens on the base class.

2018-11-01_15-49-44.png

The member VI is set to shared clone reentrant execution on both as suggested in the IDE (pre-allocated doesn't work which I can understand).

 

Example classes attached

 

I found this but it didn't help: https://forums.ni.com/t5/LabVIEW/Recursion-Error-with-Dynamic-Dispatch-Shared-Clone/m-p/3633722

 

Control UR5e with LabVIEW

$
0
0

Hi there

I'm trying to control a UR5e robotic arm through LabVIEW. I'm using the TCP/IP for communication. As per the data shared on the UR website, I'm trying to communicate on port 30003(both write and read TCP). I'm able to see the robot (virtual robot in URsim) responding to move commands (however the current position being read X,Y,Z are deviated from the values being sent as pose).

 

Can someone please help me work it out?

Thanks

LabVIEW pinned to taskbar and patch updates

$
0
0

Since I use it often, all my LabVIEW versions are pinned to the taskbar for easy access. There is one problem (at least under windows 10).

 

With every patch update, such as 2018.0f2 just released, the old LabVIEW 2018 taskbar icon turns blank after installation and after a reboot, the icon in the taskbar disappears completely.

 

Now I have to go to the menu, find the new exe, and pin it again to the taskbar. Wash rinse repeat with every update. Smiley Sad

 

I guess this might be a security feature of Windows 10 and there is little NI can do about it. Even if there is an existing taskbar shortcut and there is an exe with the same name and at the same place, windows will remove the link if the exe changes by even one byte.

 

Still annoying. Is there a way to avoid that?

How to read the new file names in a directory of another PC

$
0
0

Hi all,

 

We are building a labview application to monitor and control a manufacturing line.

Labview is installed on the main PC that operates the line.

Since some sensors are operated on their own PCs, we want to record the timings of all measurements of these sensors on the main PC to centralize the timings of all mesurements. 

The sensors generate spc files (spectral data) more or less every 10s in a directory of their own PC.

 

How is it possible with labview to record that filename and the time (time of the main PC with labview) when the file appears on the sensors PC.

 

I tried the list folder function but it gives all files and not the new ones. 

Viewing all 69085 articles
Browse latest View live


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