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

waveform graph current time offset

$
0
0

hello,

 

I am trying to know what is the offset when i configure the starting point(t0) of a waveform graph to be current time.

 

I want to create a smart zoom and I need the x axis, where it start to print the data.

If there is a way to know what is the last x axis point what new data is printed it will be better

 

thanks


personal information database

$
0
0

Hi everyone , thanks a lot for your time .

I'm developing a Hotel reservation software with labview , i have in the control panel 20 indicators , each one represents a room , i select between dates and it shows in red color the booked rooms and in green color the free ones , everything seems to work fine , now i have to add to the software the functionality to handle the people who come to the hotel (name,address,phone number,etc....)  and obviously store the data into a database so that the next time the people come,  the hotel receptionist would not  have to ask again all their personal data.

It should have a function to search into the database if the person already exits , if not just add a new one .

In a few years the data into the database will become big , so i need to know if there is a way to handle big database in labview and to be able to search into it?

Thanks in advance .

how to switch on and off part of the "control panel"

$
0
0

I want to know if part of the control panel can be switched on and off by external action, as using the mouse or a boolean variable. Has someone any idea that coul help? Thanks

Ricardo

NI 9205

$
0
0

NI 9205 limits voltage to my Labiew program. I can put 0-5 volts DC and all my DAQ assist reading are less than .8 volts

RT Memory Leak, CRio 9081

$
0
0

Running this code on a CRio 9081, only monitoring system resources. The memory continues to decrease until the CRio crashes and does not recover. I've my real code is much more comples than this, with FPGA FIFO reads, calculations, arrays, live updating xy-graphs. I remove everything and still the memory disintegrates over about 40hrs. Any ideas? LAbview 2015, recently reformatted CRio drive and reupdated software. Jim

Hidden nodes and block diagram elements

$
0
0

Hi All,

 

I have this wierd situation where having a terribly huge program, wierd things happens. The main loop which is a massive while loop has been resized a few times in the past and now, the "stop on true" conditional element

of the while loop is nowhere to be found but hidden far far away. All I can see are the dotted lines that links the stop button to it. Expanding the while loop to reach it seems to do nothing as it continues to be somewhere out there. the while loop seems to be at its limits already and can't be expanded anymore. I tried to the the block diagram cleanup but its useless as it is another problem to the huge program, it doesn't allow me to cleanup for some reason and it would uncover more problems as well. If anyone has an idea out there, Please let me know. thanks!

Realtime viewing and logging multiple MODBUS slave device register values

$
0
0

Our lab expert left and I need help obtaining data from two slave devices communicating via modbus protocol through RS485 to USB. I would like to connect them to LabVIEW to visualize and log data on these flowmeters (Endress Hauser CNGnass MODBUS RS485, read address 32007)

 

I've been trying to use the Modbus library without success and do not have access to the DSC module. I only want to read the register values for these two separate (USB connected) devices, see what is going on live to know when to shut them down in LabVIEW, and then have a file export where I can do further analysis of the data. 

 

How do you configure two separate USB MODBUS devices, get a live read of their values with a single graph, and save both sets of data to a timestamped file with time on X axis and both device data on Y.

 

I've attached my attempt for this, please let me know if you have any suggestions

hex to binary

$
0
0

I've searched and found examples of exactly what it is I want to do, but for whatever reason, I'm not getting the correct values I want. 

 

All I need to do is take a hex value...1F4EF5, and translate it into simple BCD so that I can take it apart at the bit level.  I'm currently following a few examples that simply take the hex string, convert it to an integer then to binary and I'm getting wrong results for the binary.  Any help would be appreciated.


System Exec not working in executable

$
0
0

Again I must be doing something silly! 

I am using System Exec to start/stop services. It works well on my development machine but on a standalone pc with only run-time license installed, it simply could not start/stop those services! 

I did some research and found we have to configure executable or another alternative is to use .net to achieve this. Could I stick with System Exec to achieve this?

 

Many thanks

K Waris

 

SR400 while loop doesn't work

$
0
0

Hi,

 

I am using LabVIEW to control SR400 through a GPIB card.

 

I use SR400 to count the number of signal in one second, wait for 0.05s, then count the signal again, wait for 0.05s again, and so on.

 

However the while loop didn't iterate. When I started the program, it only iterated once.

 

In highlight execution mode, when one iteration is finished, it waited for a long time to start the next. In the normal mode, it didn't iterate. 

 

Also when I clicked the stop button, it remained clicked. However when I wrote a very simple program, the stop button operated normally.

 

Anyway the button issue is not very important. I don't care whether the program iterates forever or not. I just want to make it iterate. 

 

I searched the board and hadn't couldn't any related problem.

 

Is it better to attach my VI? The VI is in my lab computer.

 

Thank you so much!

 

 

fpga

$
0
0

Hello,

 

I'm having a broken vi due to two FPGA Interface Dynamic types with different configuration. Im using a labview bit file as an input to an invoke node. Any idea how can i match my FPGA Reference Out vi output? Thanks a lot.

memory subvi

$
0
0

Dear all,

I wonder how i can store data within a subVI when the iterating loop (an thus the shift registers) are in the mainVI (or in my actual case, four levels up in VI calling).

so far i solved this with a global array variable , but i feel this is not the way to do this. what is the best way for this?

last n ticks.PNG

Thank you for your advice!

xnet timestamp

$
0
0

Hi,

 

I'm currently implementing a dump of CAN data to a tdms file to one of my pieces of software. Xnet does contain an example of how to do this in a way that Diadem will natively understand the file and can analyse it with the help of the Bus log converter:

 

<examples>\nixnet\NI-XNET Frame Conversion and Logfile.llb\NI-XNET Frame&Log - Convert Frames (CAN to Raw).vi

 

One part of this example is the conversion of the time stamp to a U64:

 

<examples>\xnet\xnet.llb\_XNET Convert Time LV to U64.vi

 

My software is not using any of the xnet functionality which means that I don't want to be forced to install xnet on the target machines. The conversion of timestamps is done by a dll call which means that I have to re-create the conversion in LabVIEW to avoid having to install Xnet.

 

This itself is not an issue, the U64 is simply counting in steps of 100ns that works fine from 1/1/1904 until 31/12/1976 5:59:59:999

 

When going to 31/12/1976 6:00:00:000 you will notice that the dll will add a seemingly random offset of 9561628800E+7 to the result. I tested for higher value timestamps and there doesn't seem to be a change of this offset until the end of the year 3000 which seems to be the end of the timestamp range.

 

Question is now where does this sudden offset come from, what is special about 31/12/1976 6:00:00:000?

 

Any clues greatly appreciated

 

Rg Mathis

Shared variables with FPGA Module

$
0
0

Hi everyone.

 

I am having some trouble passing a shared variable from RT to FPGA with my sbRIO-9651.

 

I am using a 32-bit Integer going from the FPGA to the RT and an Unsigned 16-Bit Integer going from RT to FPGA. The U16 Integer connects to an enum in a windows host VI.

 

Any ideas why I might be getting issues? I Can pass data from windows to RT perfectly fine, its just when it gets from RT to FPGA that I get build errors.

 

UPDATE: I have included the zip file of the project. Its a little convoluted to follow as I haven't finished modifying the code yet and it originated from a wizard, so lots of code I don't need. But the FPGA VI should be fairly clear.

Show expand/collapse icon in tree control

$
0
0

Hello;

 

I have to build a tree control with a lot of items reading from a database. If i read all at the beginning it needs a lot of time to create the tree so I only charge the Parents and, If  I double click in the item I do the query to the database to charge the childs.

 

The problem is that if I don't double click in the item idon´t have the expand/collapse icon (because there aren´t childrens yet) until I double click on it to get the childrens.

 

Is there any way to show the expand/collapse icon without childrens in the parent?

 

Thanks;

 

Sin título.jpg


stateflow with model interface toolkit

$
0
0

I am trying to get a simple stateflow model developed in Matalb/Simulink to run on Labview using Model Interface Toolkit, but I don't get any state transitions.

 

The stateflow model (attached is very simple) - two states, starts in default state with output 1, when input changes to 1 the state transition to second sate with output 2.

 

The model complies fine, the VI runs without any errors but I don't get any change in output.

 

I am running the model execute in a timed loop with time period equal to the time period of the Simulink model.

 

Both files are attached. 

 

Any one have experience with this

VISA Serial Read missing data in between

$
0
0

Hi,

 

I am communicating with a motor controller from PCB motors over an emulated COM Port from Windows 7. LabVIEW Version 2013.

COM Port Settings:

   19200 Baud

   8 data bits

   1 stop bit

   no flow control

   no parity

 

Most of the time the serial communication works just fine, but randomly some data gets missing. Playing with delays at different sections in the code did not help.

 

More accurately: I send the command "RD4,RD6,R10,RD12,R31,R32,R42,R43" to the controller to read values from the register and continously read until the ">>" symbol signals the end of the data (that's what the while loop does). Sometimes part of the reply of the controller goes missing.

 

Normal situation: The controller answers with the accepted command and the data asked for:

 

RD4,RD6,R10,RD12,R31,R32,R42,R43

Memory# 4(+1): 20
Memory# 6(+1): 9999
Memory# 10: 255
Memory# 12(+1): 9999
Memory# 31: 100
Memory# 32: 100
Memory# 42: 100
Memory# 43: 100

 

But sometimes the first line of the data is missing ("Memory# 4(+1): 20"):

 

RD4,RD6,R10,RD12,R31,R32,R42,R43

Memory# 6(+1): 9999
Memory# 10: 255
Memory# 12(+1): 9999
Memory# 31: 100
Memory# 32: 100
Memory# 42: 100
Memory# 43: 100

 

I would understand data missing at the beginning or end, but inbetween?

 

When using Termite 2.6 this problem does not seem to occur.

 

Any ideas?

Jonas

How can I load history data to a chart?

$
0
0

I am using a chart to display some signals I am acquiring, and I am logging the data simultaneously to disk.

When the VI starts I would like to read the latest log file and populate the chart with the contents. 

 

Is there any way to do this? I have tried setting the History property, and the chart does draw the data but it is not "really there" ie. when the chart scale is resized that data goes away, and also the chart starts drawing the new acquired data on top of the history data.

how to get UTC timestamp for deteriming start of new hour, day and month

$
0
0

I have a data logging application in which I want to produce archive records at the start of each "new" hour, day and month with statistics over the "previous" hour/day/month. I want the archive records to have timestamps that designate the start of data collection time period.  I use Get Date/Time in Seconds in my data collection loop, followed by Seconds to Date/Time and Unbundle by Name and I then detect loop iterations where the Unbundle outputs (hour, day of month, and month) change value. Problem is I "miss" an hour every fall at the daylight savings fall-back -- the Unbundle by Name hours output does not change at the fall-back hour. (Different but related artifacts occur at the spring-forward transition.) My issue would be easily resolved if Get Date/Time in Seconds had an option to output a timestamp in my local EST without daylight savings adjustments or to output UTC (which I could then offset for my timezone). Unfortunately, Get Date/Time in Seconds does not support those options. Would that not be an easy Labview modification?

     I've reviewed the many posts on the subject of "UTC timestamps" and I've experimented with every combination of "to UTC", "is UTC", "is DST" (0, 1, -1), display format editing, and computer system time display that I can think of but no success. I've seen some very thoughtful discussions on the subtleties of timestamps and the daylights savings impacts. BUT I have not been able to find an approach that would allow me to generate and operate on a UTC timestamp that is ALWAYS correct.

     Setting "to UTC" to T in Seconds to Date/Time, I can easily detect the hour transitions in my data loop, I think I can also work out the details of detecting and synchronizing the hour and month transitions and deriving the archive timestamps but my code would be much more straightforward if I could operate directly on a timestamp in standard time year-round.

     Any suggestions would be greatly appreciated.

   

Get task frequency from max

$
0
0

Hello,

 

I wrote a piece of code to obtain a list of tasks configured in MAX and obtain info about those (frequency and number of channels).

It works fine except it doesn't refresh when I change the parameters in max while my vi is running.

If I change any parameter in max for the change to be reflected in my vi I need to stop the vi and restart it.

 

Is there another method to access these properties?

 

Best regards

Viewing all 68979 articles
Browse latest View live


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