Hola que tal comunidad , Estoy desarrollando un proyecto de residencia para titularme de ingeniero mecatronico , como proyecto estoy desarrollando una interfaz de control para controlar un proceso de maquinado ECDM , mi problema es que en la parte de control necesito adquirir datos del proceso de la corriente y voltaje. sin embargo para poder evaluar el proceso necesito tener una capacidad de lectura de al menos 20,000 datos por segundo o incluso mayor , y lo mas que he podido adquirir son 1000 datos por segundo. Es posible aumentar la capacidad de lectura. Saludos!
Adquisición de datos
Adquisición de datos
Coercion dots between typedef to non-typedef
Hello,
I've read some old topics about coercion dots between typedef & non-typedef, but I don't understood the solution quite well.
I don't understood how do I remove the typedef coercion dots efficiently.
In my VI, I use custom Controls to represent LEDs and 2D Array along my main and subVIs. If I change one of the standard .ctl, all instances have to change. So typedef is a requirement.
Look at one of my subVI:
I'm receiving data from a PLC with OPC-Read function, this data is organized inside the subvi "Barra Status 0", and the result is shown on my custom Boolean Control. I want to remove these coercion dots...
But the only option that I could see was to do a "Case Structure",something like this:
But it really doesn't look like good practice. (I'm using three different custom boolenas in this snippet)
The second coercion dot that is annoying me is the coercion dot in the 2D Array. Because I transfer the data between subVIs with Notifiers/Queue, the typedef is good if the data needs to change its type (using typedef I don't need to manually change the constant on each Obtain Notifier/Queue). But again I have a coercion dot after the data read from OPC-DAQ
How can I remove these coercion dots?
Problem with SystemLink/Skyline Tags in an NXG Web VI
I have an application where I need to pass data from LabVIEW to NXG. To try this out, I am using the Multiple Tag Writer example project in LabVIEW, which runs a VI called Write Multiple Tags Client. No issues running this VI in LabVIEW 2018.
In NXG 3.1, I have created a gvi that can read the tag. (pictured in the attachment). This works just fine.
I would like to make this a web VI. I tried copying/recreating the code into a gviweb, but when I run it, I get an error:
"Javascript message: Failed to load http://localhost/nitag/v2/tags
Is there a reason why this kind of VI works as a gvi, but not gviweb?
Thanks.
real time data from sensors that need to be saved in csv format
Hi all,
I am using LabVIEW to acquire data from sensors (temperature, humidity, pressure etc) using Modbus protocol (rs-485). My data is divided into input and holding register depending on the type of sensor output. I have developed a LabVIEW VI which correctly obtain the sensor values (in terms of input and holding registers). Now I am stuck with how to save the data such that I get one excel file with the header as sensor1, sensor 2 ... (or with sensor ID) and my rows as data acquired in continues time manner? Any help on how to develop a VI, please see the attached picture where I need to save my data from points described by a red circle in the attached picture.
search for header data in serial data
Hi,
I'm new to LabVIEW and trying to use the serial port to search for header data to synchronise with.
I can't get the program to run without an overrun error.
Any ideas? The program should run through three states, wait for header, size and receive data.
Many thanks.
cRio - EtherNet /IP - PLC replacement
Dear LabVIEW experts,
due to availabilty of multiple cRio at our University it was decided to use a 9074 as an alternative to an additional DAQ PLC. The control loops and triggering for the whole project were outsourced to the robot control and therefore the cRio is basically only intended as a Data Logger.
We have up to 5 sources (connected with: https://www.phoenixcontact.com/online/portal/ch/?uri=pxc-oc-itemdetailid=2701418&library=chde&pcck=P-08-12-04-05&tab=1&selectedCategory=ALL) that need to be logged at a 1kHz sampling rate.
My question is (lets for now assume all the devices have a scanner ability): is it theoretically possible to log all those sources with a 1kHz sampling rate by using the EtherNet / IP driver of NI on the cRio? Or do we have to switch to analog inputs?
What got me concerned in the first place was the following post talking about 12ms+ on the cRio:
https://forums.ni.com/t5/LabVIEW/Ethernet-IP-performance-and-cRIO/td-p/2160274?profile.language=en
Best Regards and many thanks for your help!
Call Windows DLL with structure and wchar_t string pointers
Hello all,
I'm trying to eliminate the call to a wrapper DLL by calling a Windows DLL directly and passing it a structure that also contains some string pointers.
The function I'm trying to call is SHFileOperation located inside shell32.dll. I need this function to do a Windows file copy operation that can be cancelled by the operator. (copying a folder of >50GB of data)
The SHFileOperation function expects a structure as an input called SHFILEOPSTRUCT. This structure contains two pointers - a from location and a to location. These pointers are of type PCZZSTR. These are actually const wchar_t pointers.
Here is the information from msdn for the function and the input structure.
https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-shfileoperationw
https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/ns-shellapi-_shfileopstructa
The input structure is properly aligned. I verified that by passing the structure to a dummy wrapper DLL function I created and verifying if all fields are properly aligned.
After debugging my suspicion goes out to the 'pFrom' and 'pTo' string pointers that need to be passed via the input structure. Although the info is there inside the structure, it seems like the function cannot access it or interpret it...
To create the wchar_t pointers I called DSNewPtr and MultiByteToWideChar. (see attached LabVIEW code)
Note: I copied this string pointer allocation from some code of Rolf Kalbermatter I found online - credits go to him!
Unfortunately - even with this code I cannot get it to work.
If I just create a wrapper DLL where I pass two strings and create the SHFILEOPSTRUCT structure inside the DLL everything works OK. But - I want to avoid having to create/call a wrapper DLL by calling the Windows shell32.dll function directly.
While debugging the issue it seems like the structure is passed correctly and it contains the correct info inside the string. See also attached png file. I created a wrapper DLL to inspect/test the passing of the structure. In Visual C++ I see that the structure is correctly filled in but still it doesn't work.
Anyone any ideas of what I'm doing wrong. I've attached the LabVIEW code. I'm using LabVIEW 2014 SP1 32 bit.
The function is supposed to copy the complete folder contents (source folder) to another folder (destination folder).
Thanks in advance for the help!
LabVIEW Crashes when opening project
Hello,
I am rewriting a project in LabVIEW 2017 32bits, it used to work in 64bits. But one dll used for hardaware communication is not available in 64 bit version.
My project is based on multiple levels of PPL whith different level of dependencies. Parents class are containe in higher level PPL.
One of the projects to build a PPL cannot open any more. It used to crash and generate a report but now it is not even caught by the crash report. Sometimes it asks me when If I want to handle the crash when labView restarts.
I've attached the code of the project. The 3 PPL required to compile this project and a crash report.
I've run out of things to try to continue investigating. The project that I can't open is \plugin Generique\Plugin Generique.lvproj
Using LabVIEW 2017 32bit
Windows 10.
Automatic VISA Write
Hello all, i was trying to find a way to send commands through the serial automatically. In my project i read the data from sensors through serial read when writing serial commands 1,2,...,5. Now i'm required to get these readings every 30 seconds (i just need to send one number). So is there any method to automatically send a number serially using VISA Write? and how can i put a delay between every iteration?
Thanks.
Give user the option to save data/graph after program execution
Hi,
I have a program that uses a for loop to take in analog data, performs calculations and then generates a simple XY Graph.
I would like the option to save the generated graph after the program has executed, but i do not want to save the data each time i run the program. This would ideally be presented in a button on the front panel that would prompt "Do you wish to save?", and the user would select yes/no accordingly.
Is this functionality available in labview, and if so, what functionality should I use to implement it?
I have attached a VI of a sample program similar to the program described.
Strange 16 bit CRC check
Hi,
So I am working with what appears to be a non-standard 16 bit CRC check. I have searched over the forums, and found many great examples of how to do this. I have enclosed the one that I am using at the moment. It seems to work just fine. I went to the website https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/
and it matches what the CRC check seems to be outputting, with the same set of data. However, this does not match what the system is outputting for a CRC-check. So with the following data set: 2000 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA 5555 5555 5555 5555 5555 5555 5555 AAAA 5555 5555 AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA 5555 5555 AAAA AAAA AAAA AA55 5555 5555 5555 5555 5555 5555 5555 AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA 5555 5555 5555 5555 5555 5555 5555 AAAA AAAA AAAA AAAA AAAA AAAA 5555 AAAA 5555 AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA 5555 AAAA AAAA 5555 5555 5555 5555 5555 5555 5555 AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AA55 AAAA AAAA 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 5555 can anyone see how it might be able to produce an output of " 901C h" ? Is there some additional math gyration that I might be missing? Thanks...
How can I use LabVIEW to communicate with TI DLP using USB RAW?
I need help using LabVIEW to communicate with a TI DLP Lightcrafter 4500 unit using USB.I am not very familiar with USB protocol, however, after reading the DLPC350 Programmer's Guide, I know USB control of the DLP unit is possible using USB. In the past I was successfully able to use I2C protocol to communicate with the DLP using LabVIEW and Arundio. However, now I would like to learn how to use USB instead of I2C.
I used the USB Instrument Control Tutorial guide to setup the USB RAW drivers so it can be recognized by NI-VISA. I was able to successfully setup the drivers and get the devices to be recognized as a VISA Resource. Now I am using the example VI, "USB RAW - Control.vi" to communicate with the DLP unit (screenshot below). However, I am really confused on what I have to do with this example VI.
I read page 9-10 of the DLPC350 Programmer's Guide which explains the USB read/write transaction sequence. However, I am still not understanding exact what values I have to configure in the USB RAW - Control.vi to successfully control the DLP unit. Below is a screenshot of an exaple command reference to read the current power state of the DLP unit or to write (change) the current power state of the DLP unit. Using this example USB command reference, how can I use LabVIEW to control the DLP using USB?
Continuous voltage data acquisition with Agilent 34972A
Hello everybody,
I want develloped a LabVIEW VI which should log 3 voltages. The programme works fine . But it seems as if LabVIEW records the channels step by step and there are always about 1s between two different voltages for each channel.And the machine will have the sound of switching channels. How can I make these sounds disappear and keep the machine collecting data? I want them to be parallelized and continuous.It might be possible that my LabVIEW VI is the problem because I actually had no idea how to create my VI and I was really surprised when it seemed to work.
I attached my VI and a text data to show you how it looks like.I want new voltages been logged every 100ms.
I use Agilent 34972A and LabVIEW2016.
Thank you very much and if anything isn't clear yet, just ask.
Maximum size of Array (buffer constraints)
Hi there,
I wrote a program to sum the outputs of a 128x128 pixel CCD camera in an array, then write out the aggregate to a .csv file. When I checked the program, I found that the output became wrong when too many acquisitions were summed (i.e. total in output file does not tally with sum of individual pixel data). I have been told it might be a buffer issue.
Is saving into an array the best way to store pixel data (integers about 2000-8000)?
Does LabView have a hard limit on the size of the buffer for an array? Is it really possible to store a 128x128 array of integers with value 1.79E308?
Thank you very much for your inputs.
MathScript does not execute m-function.
Handle File Path with Parantheses
I have a Windows 10 64-bit machine and I am using LabVIEW 32-bit for development. I am trying to distribute an application and the stand-alone installs into C:\Program Files (x86)\<My Program>.
I have a .JSON file I try to read via my VIs and it errors out. I am suspecting that LabVIEW open\create\replace file does not like the parantheses. I can always install my application in a different directory, but I want to understand if somebody has faced this issue before and what the work-around was?
3-axis Motor Control
Hello, I am completely new to LabVIEW except for some experience with NXG.
I need to control a Thorlabs KDC101 controller to operate with this motor:
https://www.thorlabs.com/thorproduct.cfm?partnumber=KMTS25E/M
I am trying to use the ActiveX software through LabVIEW to do the following main operations:
- Select the axis of interest (In this case the motor stage must move in XYZ)
- Control the step size of movements and feedback the position value
- Move to a specified distance (ideally by using a joystick of some kind) at a specified velocity
I have worked through the example provided in https://www.thorlabs.com/images/TabImages/GuideToLabVIEWandAPT.pdf which provides a sort of structure to begin with.
The code so far looks something like the attached image.
I have also attached the sort of front panel which is desired.
Any help on how to get started with this would be greatly appreciated,
Thanks
Using a Serial Linear Actuator in LabVIEW
I am trying to generate signals from an Ultramotion serial linear actuator in LabVIEW and have these signals cause displacements in the actuator. I know I need to use NI-VISA to communicate with the actuator, but I am unsure of how to wire the VISA graphic in the block diagram, and also how to specify the COM1 port I am using on the computer in LabVIEW. Any help would be appreciated. I've included a snip of the block diagram code to control the actuator that was given to me for a project very, very similar to the one I am working on.
Error 1097 while trying to build installer
All,
I am experiencing an issue I've never seen before.I am using Windows 10 64-bit, LabVIEW 32-bit 2018.
When I try to build an installer with an existing project (Executable and Package manager OK), I see Error 1097 (attached screenshot). I built a brand new project with a simple VI to see if can build an installer and it gives me same error. In fact, when I right click Build Specifications -> New -> Installer, it gives me Error 1097.
I have followed the NI KB - repair/modify, then uninstall/reinstall the package builder. It doesn't help. Has anybody seen this issue before specific to what I am seeing (Project independent)? I am thinking i have a bad installation (OR) no permission to the directory where LabVIEW tries to write temp files to build an installer? Not sure. Any pointers welcome and appreciated - thank you.