Hello everyone,
In this quarintine I´ve developed a snake game code in Labview and I would like you to tell me what do you think about it? How can I improve it?
Thank you
Wait for your reply
Hello everyone,
In this quarintine I´ve developed a snake game code in Labview and I would like you to tell me what do you think about it? How can I improve it?
Thank you
Wait for your reply
I have a cluster in Labview, which consists of three different clusters. This cluster is passed to a C++ DLL function using the "Call Library Function Node", and by setting the parameter there "Adapt to Type" (Type) and "Handles by Value" (Data format).
Lets assume for the purpose of illustration, and not to overwhelm you guys with the huge set of parameters, and names, that my clusters are of the following form:
C1:
{
int i_1;
double d_1;
};
C2:
{
int i_2_1;
int i_2_2;
int i_2_3;
};
C3:
{
int i_3_1;
int i_3_2;
};
So the Cluster C = {C1,C2,C3} is the cluster I am passing to the DLL function.
The corresponding Structures at the C++ side are:
struct S1
{
int i_1;
double d_1;
S1 (): i_1(0), d_1(1.0) {};
};
struct S2:
{
int i_2_1;
int i_2_2;
int i_2_3;
S2 (): i_2_1(0), i_2_2(0), i_2_3(0) {};
};
struct S3:
{
int i_3_1;
int i_3_2;
S3 (): i_3_1(0), i_3_2(0) {};
};
S = {S1;S2;S3;};
The DLL function is of the form: extern "C" _declspec(dllexport) void foo(S* params);
This all runs smoothly and nice.
The problem occurs, when I try to add a new parameter to one of the above clusters/structs.
For example, if I attempt to add to C1 a third parameter - int i_1_new; and accordingly adding int i_1_new; to S1, where now
C1:
{
int i_1;
double d_1;
int i_1_new;
}
and
struct S1
{
int i_1;
double d_1;
int i_1_new;
S1 (): i_1(0), d_1(1.0),i_1_new(140) {};
};
ALL the parameter values in the C cluster look in tact and are correct upon calling the DLL function. When debugging the "foo" function at the first line - I get the following: S1 struct is in tact - all values are correct and in place, but S2 gets corrupted such that if the data should be:
S2 = {123,456,789}, it is now {0,123,456}, and the third parameter of S2 is shifted to S3's first parameter (i.e i_3_1 = 789 now).
I'm using a 64 bit LabVIEW 2018, and Visual Studio 2010.
Any suggestions as for how to solve this problem, and why it occurs?
Thank you!
I have data in Excel (see attached example) where column 1 contains the timing info and columns 2, 3 etc are the measurements at those time points
I can use the Read from Spreadsheet.vi to display these data on a Waveform Graph (see attached script). However the x-axis defaults to the row number. How do I display these data using the column 1 timing info as the x-axis instead?
Hi everyone,
I am trying to simulate a part of dialysis machine flow diagram. The idea of the program is to have the dialysate flow rate and the electrical conductivity of the flowrates as controllers and based on the values of the electrical conductivity and the dialysate flowrate, the values of the flowrates of the concentrates forming the dialysate flowrate should change and as a a result the rotational speed of the pumps should be changed.
My problem here is that all parameters are depending on each other, so if I want to enter a value for the dialysate flowrate, it should change the flowrates of the concentrates and water, subsquently the conductivity and the rotational speed of the pumps AND if I change the value of the electrical conductivity it would change all the other parameters. So how could I implement that in the program? I thought about using the case structures and make the value of the dialysate flowrate the controller and the value of the conductivity the indicator in once case and in the other case I do the opposite.
I would be thankful for your tips. I added a pdf of a sketch I made to make it easier for you to follow my words
Hello all ;
I need to access to our site local http://10.219.119.10 by LABVIEW but after the app insert username and password there is not access to the page .
more detail in photo and vi
Hello,
It is my first time working with Labview and I am having some problems when I try to plot data from Arduino. I have been using serial port communication and I am able to plot single variables on normal graph. The problem comes when I want to plot two variables using XY graph. In this case I want to plot volume on X axis and pressure on Y axis. These results come from Arduino as a string and then they are processed in Labview. The come with an initial letter which is the "identification" symbol for the string and a comma as the termination symbol. I don't know why my VI does only represent one point each time instead of a continuous graph as I have seen in other examples. It would be great if you could help me.
I add my VI and arduino files.
Thanks.
Lucas.
Hi,
I have recently started experimenting with LabVIEW NXG 5.0 where I try to get some of my LabVIEW 2020 applications, using "User32.dlll", to work.
So far so good, but the "SetForegroundWindow" function that does not work as intended as I think the reason is (in my case) that the application window is not running as "floating".
Does anyone know where/how to set whether the window should be "Default / Floating / Modal" ? 🤔
hi every one
i am using Labview 15 and i have database of to tables in mysql using phpmyadmin.
so i try to connect to the database using microsoft toolkit datalink properity using ODBC server .
when i test the connection i receive the error:
so please any idea!!!1
Hello guys
I have a case structure in an event case and using enum now for some reason the code keeps skipping over some of the cases. Any idea on how to resolve this issue.
Thank you in advance
Hello,
Does anyone know if LabVIEW-Multisim Co-simulation Plug-in works in LabVew 2019, I have 32-bits LV2019 but the option doesn't appear to me.
Thank you.
The button strings, most of them , are written in Chinese characters.
But I think it should display fine, because we can use UTF-8 encoding , right ?
I have installed an evaluation version of the 2018 labview software, which is an English version,
I do not think I will have to download 2G more files, to reinstall a Chinese version, that would be toooo time &Downstream Traffic consuming !
Why not just display correct in an English version ?
It is supposed to display like this
While it actually displayed like this-_-
I am using an evaluation of labview 2018
Hello,
i have a PXIe system with certain DAQ-modules in it. In order to communicate with another unit i have to implement the RS485-standard. Is it possible to communicate via Labview or Veristand and the DAQ-modules with this unit? Which program would be more useful and simpler in this case?
Thank you
Hello everyone,
I am new to LabVIEW have a question regarding a part of a program that I'm working on.
I am writing a program to read and save data from a Paperless recorder (Yokogawa GP20) and currently having trouble in getting the data organized in the format that I need.
The program uses 122 channels from the device in order to read currents and voltages. So, I am trying to get the data from all 122 channels every second for 10 seconds to form an array and save as CSV in the following format.
10, Ch1, Ch2, Ch3, . . . , Ch122
9, Ch1, Ch2, Ch3, . . . , Ch122
8, Ch1, Ch2, Ch3, . . . , Ch122
.
.
.
* The first element in each line refers to the remaining time.
Your help would be highly appreciated.
I have attached the segment of code relating to this issue. Please let me know if more information is required.
Software, Drivers and Equipment used:
* LabVEIW Ver. 2017
* Driver: Yokogawa GX Series
VISA Resource Name: TCPIP::172.16.0.101::34434::SOCKET
* Yokogawa GP20 Paperless recorder
* Toshiba Windows 10 PC
Thanks in advance.
I encountered unexpected behavior when trying to access Map values with For Loop. This is simplified code.
As you see, one value is added to empty map then read in two different ways. Surprisingly for me indicator value by loop receives no data while the map contains expected member and indicator key by loop receives correct key value.
LabVIEW 2019 64-bit
What do I do wrong?
Thank you.
Hello everyone,
i have a problem with aquiring data with my PXIe System using LabVIEW.
To my hardware:
PXIe-8880
and the data acqusisition cards PXIe-6738,-6356,-6378,-4353
I can neither find the harware with the DAQmx nor with creating a task (as well as global task) in MAX.
As mentioned in the topic it is a remote system. What could be the easiest way to acquire data with this system?
Regards,
Michael
Hellos,
If I tried to connect one of the math constants, I get an error in connection!!
Why? and how to solve this problem ...!!!
Hello
I'm trying to read a PCM Stream that is send from a measurement system via RS422. The device has two data lines (Data+/-) and two Clock Lines (Clock +/-). I have the Moxa Uport 1250 which converts the RS422 to USB.
So far I've dealt with RS232 and I would know how to decode the Stream once I actually receive the data. But I'm struggling here on what to do with the Clock Lines. Do I have to connect them to the TX Lines of the RS-to-USB Converter? Do I have to generate the Clock Signal myself somehow in Labview?
Thanks for any Pointers to the correct direction.
Hello,
I'm new to LabView and Arduino. I'm working from home and want to learn LabView using an Arduino Uno. I'm running MacOS 10.15.4 (Catalina) using LabView 2019 v19.0.1. I have the Arduino Uno connected to my computer via USB. I see that I need to download Linx to communicate with the Arduino. However, when in the LabView MakerHub (http://www.ni.com/gate/gb/GB_EVALTLKTLINXLVH/US), I found that clicking "Download Toolkit" doesn't work. One of the trouble shooting suggestions is that I need to download the "VI Package Manager" first. I downloaded the .zip, and ran the .dmg to install the VIPM. Unfortunately, it sits in my dock with a big diagonal line, suggesting it will not work. When I try to launch VIPM, I get an error stating VI Package Manager needs to be updated.
Is VIPM and Linx not supported on MacOS 10.15? Any other suggestions on how to run Linx or communicate with the Arduino using LabView?
Hi,
New to Labview so apologies if the wording of my question seems simplistic or not clear, if anyone feels they can help but needs further clarity on my issue please let me know.
I am trying to create a user interface for a test lab environment, where the operator will select specific options or input data. I then want these options and data to be recorded and written to spreadsheet or text file so that the information can be reviewed to find out who did what, when and for how long. The intention is this will constantly run and return the operator back to Page 1 to choose the same or different activity.
I feel ok with creating the events etc and writing to either spreadsheet or text file and I know my block diagram needs tidied up but that isn't my issue. My issue is that when the cases aren't active they send default values and my output file is full of blanks and the data I want is on multiple rows. What I get is shown in the attached .txt file. Above the dashed line is what I get but what I want (manually typed into .txt file for explanation purposes) is below the dashed line.
Hopefully someone out there can help, and if there are any other useful pointers please let me know. Fingers crossed.
Enthusiastic but learning