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

Writing Float Data from Serial Device

$
0
0

Hello LabVIEW community,

 

I tried getting help earlier on my problem but wasn't able to come to the conclusion that I needed. Here is the situation. I have a micro controller that transmits 8 bits at a time over UART. I need to send a float value that is 32 bits. I decided to send the number in four 8 bit segments. I was wondering if there was a way in labview to take my four 8 bit values, construct it back into a 32 bit float value and then write that value into a file? Currently I have the following VI built. I have my firmware programmed to write the integer values 0 to 255 when it received the ASCII letter 'g' in it's received buffer (hence the VISA write block in my labVIEW program). I have tested and confirmed in my firmware debugger that I can receive characters being transmitted by the LabVIEW program. I was wondering if someone could help point me into the right direction.


LabviewによるRTD温度測定およびPID温度制御、そしてSSRへの電気信号の送り方について

Receive UDP packets and display on waveform chart has problem

$
0
0

My vi (UdpRevLV.vi) receive data form MFC , and decompose the datas. After I added  the code to quit the program(exit button),  the displayed waveform is distorted,  is that the reason I got  wrong data?  

correct wave is like thiscorrect wave is like thisnow wave seem distortednow wave seem distorted

Attach the code,please help me  .

Send commands to Hyperterminal

$
0
0

Hello,

 

is it possible to send commands from LabView to Hyperterminal to control a device?

 

At the moment I'm trying to write a .vi to make a long term test of a device by letting him perform the the same measurement several thousand times and reading out two parameters after each measurement. At the moment I'm doing it via the TCP .vis (Visa and Ni MAX isn't working with that device for some reason) but this for some reason not very stable.

After just a few runs of the measurement the communication usually fails and I have to close and open the connection to the device again.

 

In the past it was possible to perform such long term test via Hyperterminal, but this method is not very time efficient since the timing of the commandos can't be controlled properly, so I'm considering at the moment to use LabView to control the timing of the commands in Hyperterminal. But can't figure out how to establish a communication between the two programs.

Can a LabVIEW dll be run by other SW tools?

$
0
0

I wonder what the purpose is of to create a LabVIEW dll? I have tried this feature and it works fine as long as you call the dll in LabVIEW. However, when the dll is called by for example MATLAB I get several issues. Should I expect a LabVIEW dll to work with other SW tools or not? 

GUI custom design

$
0
0

Hello,

 

 

I am interested in user designed GUIs like the one to be ssen here at the end:

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

 

Does anyone know how to design such custom GUIs in LabVIEW?

step-by-step?

 

 

Regards

Joachim

Reading Each Row Incrementally for a 2D Array of String

$
0
0

Hello, 

 

I have a 2 x 2 array of string and I wish to extract each row incrementally from an example similar to the one below. 

 

2D_Array_of_String.PNG

So all the columns from the first row need to be extracted before moving onto the next row. 

 

I want to parse each row through a state machine to manipulate the DAQ channels i.e. Analogue Output and Analogue Input. 

 

CrossRulz posted a solution previously with the VI illustrated below: 

 

2D_Array_of_String_BlockDiagram.PNG

I still want to have the capability of ignoring the // in the tab delimited text file to enable commenting for the user. 

 

Many Thanks

NI DCPower 17.0

$
0
0

Hello,

 

I am trying to set a sequence of current values with the PXIe-4139 while measuring the exact current and voltage values for each step of the sequence.

I do not have any experience with the DCPower driver so far.

Correct me if I´m wrong:

I am able to set the points for the sequence with the niDCPower Set Sequence.vi after initializing with the DCPower Initialize with Channels.vi. Then I have to go into the committed state with the Commit.vi.

For applying the sequence I use Initiate.vi so the sequence is set by the PXIe-4139.

How is it possible (if it is possible) to trigger a measurement of the actual current and voltage for each step of the sequence?

 

 

Thanks in advance.


Mean ptbypt not reaturning the average?

$
0
0

I have two signals that I would like to find the phase between. I'm not that concerned about the current phase value, but much more the average phase value. I used the instructions from NI to find phase of a square wave, and then used that output and put it into a mean ptbypt. However, I am getting the same values for the phase if I remove the mean ptbypt block. I'm not sure why it isn't finding the mean. Any help would be appreciated. I'm including the part of my vi that finds the phase and mean.

OPC UA Demo Not Working cRIO-9064

$
0
0

I had a working OPC UA LV 2016 program - upgraded to 2017 - trying to get everything upgraded to match.

 

Ran into problems with Client on PC not being able to connect to Server on the 9064.

 

Went back to basics - ran the OPC UA Demo example from NI - same behavior, Client on PC can not access the Server.  

 

Can someone else with 2017 try the OPC UA Demo.lvproj Data Access Server and Data Access Client VIs with a cRIO?

 

When on the same machine they work fine (i.e. both run on PC).  Currently using None as the Security Protocol.

I have a SR open, just looking for other eyes and tries. 

FPGA Compile server "Compilation was restarted"

$
0
0

I just observed something "new" today (meaning perhaps the behaviour is new, perhaps I only noticed an old behaviour for the first time today).

 

When performing a cloud compile of an FPGA code, after approx. 45 Minutes (estimated half way) the compilation just restarted.  First I thought it was a display glitch but now that the compilation is finished I have an entry in the "Summary" stating "Compilation was restarted" at a specific time.

 

Is this a new feature?

cRIO hybrid mode real time error

$
0
0

Attached is the project and the software that is on the cRIO.

 

I am trying to run a project on the cRIO that uses the real time module along with the FPGA modules. I am sort of new to LabVIEW, but I am familiar with the myRIOs real-time structure. All I am trying to do is send data from the host PC to the cRIO's FPGA and vice versa using analog inputs and analog outputs. I'm using a combination of user-defined variables (on the FPGA VI) and shared variables (on the cRIO real time structure). When I try to run the VI on the host PC I keep getting the error, "The target is already running a Real-Time Startup Application."

 

Any help is appreciated! And like I said I am new to the cRIO so please bare with me!

 

 

Also, I am using LabVIEW 2016 if that helps 

DAQmx create channel vs DAQmx write

$
0
0

Hi,

 

I am trying to generate a PWM using 6211. 

 

I am using DAQmx create channel.vi to create a physical channel on my device and DAQmx write.vi to set the frequency and duty cycle.

 

I see the frequency and duty cycle can also be set using DAQmx create channel.vi.

 

Can I please know the difference between setting frequency and duty cycle on DAQmx create channel and DAQmx write. 

 

 

How do you enter a non-localhost IPv6 address into this example VI?

$
0
0

I found this LabVIEW project online that runs IPv6 for Windows using what I believe is the Winsock API. I'm trying to test the VI to link two laptops running Windows LabVIEW 32 bit together with one computer acting as the server and the other acting as the client.

 

The default IPv6 address in the VI is the localhost address "::1". If I run the sever and client VI with the localhost address "::1" on the same laptop, it works, but if I try to enter an IPv6 address, like "bbbb:bbbb:bbbb:bbbb:bbbb:bbbb:bbbb:bbbb", I get a bind() error.

 

I've attached the LabVIEW project with VIs and subVIs for Windows IPv6.

 

Could someone please try it on their PC and tell me if the VIs even work?

 

Thanks.

How to efficiently read network data into struct and correct endianess

$
0
0

I have a device that transmits the following data over TCP

struct SomeData
{
  uint32_t counter;
  uint32_t status;
  double values[20];
} __attribute__((packed));

I can successfully read and make use of this data from a LabVIEW client, but the process is cumbersome.  Currently, I am manually selecting sub-arrays of bytes, reversing them to correct the endianess, type casting them to the correct type, and then bundling them into a struct.  Is there a more efficient way to do this?  I have explored using flatten/unflatten from string but I end up with Error 116.  Basically, what I want is something like the following C code.

SomeData some_data;
recv(sock_fd, &some_data, sizeof(some_data), MSG_WAITALL);
some_data.counter = be32toh(some_data.counter);
...

 


LabVIEW 2016 vs LabVIEW 2017 OPC UA WRITE Speed/Efficiency

$
0
0

Another issue with the difference between 2016 and 2017 I have found is the amount of time a Write function takes to update a tag.

 

I have an input engine that is synched to the scan engine to Read from about 50 inputs and then write the value to the associated tags.  

 

In 2016 the process is very efficient and the IOVar read and subsequent write to the OPC tag for all 50 tags completes in under 10ms.

 

Changing nothing else about that code except upgrading to 2017 showed a significant slowdown in the OPC Write vi.  This showed up as a large CPU usage in the RT since the Scan Engine was set to 100ms intervals and the 50 tag update was taking 100ms.

 

The workaround I have done now is to add my own change detection to preclude calling/writing to the OPC UA Write multiple VI.

 

The other change I can do I suppose is to build up the array of inputs and then call the write multiple outside the FOR loop.

 

LabVIEW exe cannot find VI's in lvlibp

$
0
0

I have a LabVIEW project that uses VIs and classes within an lvlibp packed library developed by another company but we own the source. I have been able to run my code in the development environment successfully. However, when I build an executable, the executable pops up a message and file browser saying it cannot find a vi in the lvlibp file. I have saved and recompiled the lvlibp and copied over to my project then saved my project and built it against the lvlibp. But when I run, the same thing happens. I placed the lvlibp in the same folder as the executable. I have also copied the whole data folder into the directory but it still does not work. If I use the file browser that pops up and click on the lvlibp it still fails and pops up a window that says "LabVIEW: file not found. The file might be in different location or deleted. Use the command prompt or the file explorer to verify the path is correct. The file '' could not be loaded. Select Another?". In the build spec for my exe project I have listed my lvlibp file. What am I missing?

 

 

Trouble Backsaving in LV 2016

$
0
0

I am trying to save a project in LV 2016 for LV 2015. I have used file >> save for previous version... a lot in the past, but until recently I was using LV 2012 and 2014. Now I am trying it in LV 2016, and for some reason it saves most of the support VIs, but my top-level VI is nowhere to be found! If I open the newly created LV 2015 project, I can see that the Main VI it links to is still located in the 2016 folder. Is this a known issue?

 

temp.png

DCPower and DAQmx Communication

$
0
0

Hello fellow LabVIEW developers,

 

I am trying to synchronize a PXIe-4139 and a PXIe-4464 and after studying the 'LabVIEW Help' I am unsure how to do it.

Maybe one of you can help me.

What I intend to do so far:

The PXIe-4139 is going to be my source for DC current where I want to generate a sequence of current values.

The PXIe-4464 is my voltage measure unit.

For each sequence iteration there will be an event created and send to a PXIe-4464 trigger.

Upon receiving the trigger the 4464 measures the voltage corresponding with the sequence iteration and creates an event which is routed to the 4139 which then continues with the next sequence iteration...so on.

 

Is that the correct procedure or is there a faster way for achieving my goal of synchroniced action of the two units?

 

 

Regards

 

Use one Boolean control in several places in various structures

$
0
0

Hey,

I am looking to use one Boolean control on the front panel to control different event structures in different case structures all within a while loop. The simple answer may just be that I need to entirely restructure my labview program (although I hope not). Is there a way to prevent having to three buttons on the front panel based on the simplified labview program attached? Is it possible to have just one button to control all three event structures depending on which case structure I am in? I have also attached the bigger labview program (Full_Linkam_Controller) that is a work in progress so you can see what I am attempting (hopefully). The other two VIs are subVIs within the Full_Linkam_Controller. Thanks.

Viewing all 66748 articles
Browse latest View live


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