Quantcast
Channel: All LabVIEW posts
Viewing all 202541 articles
Browse latest View live

Re: 2020 Interfaces and Multiple Inheritance


Re: Pass data to another VI using

$
0
0

 wrote:

Please correct me if I'm wrong. Create Sub Vi means once I finished the 2nd Vi, i just make it as subVi and then combine it with the first VI? Which means once I perform sound measurement, the subVi will be triggered as well, a single package. Can i say like that?


The "menu...edit..create subVI" is to wrap parts of code into a subVI. You already have a subVI, so you need to assign the connector pane to the desired controls and indicators.

 

Obviously you are not ready to do most of that. Apparently you jumped into the deep end without ever taking swimming lessons. That's like trying to play a game of chess without even learning the rules!

(Given these constraints, what you did is actually quite impressive! :D)

 

Yes, LabVIEW is easy once you know the rules of dataflow and the basic edit operations. While you can learn as you go, you need to start with a basic foundation.

 


 wrote:

I wrote these two VIs. The first one basically already completed. 


While they might work, they are full of meaningless and unnecessary code and overly complicated. There are also glaring mistakes. I'll point out some issues later.

 

Re: LabVIEW HTTP Client API VIs does't return the 101 code

$
0
0

Hi Philip, 

thanks for your feedback. 

 

Yes I am sending this headers:

ANDRÉ_CARVALHO_0-1589385892495.png

And I receive no answer at all. Just this error code:

ANDRÉ_CARVALHO_1-1589385941164.png

Note that the problem is not with the server, because I can stablish a connection using just the TCP VIs. Is the HTTP API that seems to have a problem...

Re: labviw call python and build applications

$
0
0

The problem I encountered is using labview2018-32-bit and python 3.6.0-32-bit and computer win7-64-bit. In the example, python node reported 1661 errors. How to solve this problem?

tedelon_0-1589385966654.png

 

Converting XNET frames of multiplexed DBCs

$
0
0

Hello Labview coimmunity,

 

I've been working on a project where we need to convert CAN frames using a DBC to-from signals. I've been using the conversion session examples provided with the XNET API but it does not seem to support multiplexed signals. When I feed CAN frames into the conversion session what I receive is ALL of the signals from the DBC file (which has over a hundred signals) with the value changed on the respective signals but without what ID or signal it belongs to. 

 

My goal is ultimately to make a bus monitor similar to the XNET but have the ability to use that data in other parts of the software easily and consistently. I've looked at both the XNET manual as well as the forums and found some good places to start such as Hooovah's post here (thanks Hooovah!). The issues I am having is that I need more than just the values to be returned, I need information such as the ID and the signal short name and unit for each signal converted.

 

My question to all of you is whether the CAN frame to single point signal conversion has ever been modified in your use cases? I'm under the impression that the function is locked so I could not add this functionality but I may be wrong. Attached is the Convert CAN Frame to-from Signal example provided by NI.

 

I am using XNET API version 19.6 and labview 2018 SP1.

Re: Standard APIs for DataScience topics

$
0
0

Hi GerDW,

 

I got your point. About the future plans of having ML in LV I'm not aware. The intent of posting the link to ML toolkit was to highlight that even if it costly, it is available and well standardized to LV environment, a point which is also part of the initial question. Just wanted to have it there as one could have missed it. 

Re: Excel file corrupted

$
0
0

I am curious about what You mean by this, exactly:

 


 wrote:

the file could not be opened due to file format or extension


If I were to save some excel file and renamed the extension from ".xlsx" to, say, ".xslx", and then tried to open it in excel, the error message would also look quite similar. Also, in addition to the suggestions above of trying .zip as an extension, you may want to try opening the file in a text editor (e.g., by renaming it to ".txt").

Re: Pass data to another VI using

$
0
0


 wrote:

I wrote these two VIs. The first one basically already completed. 


While they might work, they are full of meaningless and unnecessary code and overly complicated. There are also glaring mistakes. I'll point out some issues later.

 


"Control 2.ctl": very poor choice in naming. My downloads folder already had a Control 2.ctl with a completely unrelated datatype, so the browser renamed your control to "Control 2 (1).ctl". Your Vis loaded the wrong control, breaking all code. It is highly recommended to give unique and appropriate file names!

 

Don't maximize the diagram or front panel to the screen. This will prevent you from looking at the help windows (which you need!) and other documentation while editing.

 

"Write to Measurement.vi" (Also poor naming. Can be confused with the "Write to measurement file" express VI from the palettes).

  • Upper half: Sequence structure has no purpose. Why is it there?
  • Lower half is dysfunctional and overly complicated (See image for some comments).

altenbach_0-1589386950310.png

 

 

"ACC_CCH_Prob.vi" Sorry, I don't have and DAQ installed, so I cannot comment about most of the code. I made no attempt to understand it, but it looks pretty bad.

 

Some morsels:

 

  • "delete from array" is not the correct function to take an array subset. Try "array subset" instead, right?
  • Not sure what you think this does (image below) and why you need it. It basically truncates all input arrays to the shortest. Is that what you want?
  • altenbach_1-1589387524683.png
  • etc....

 


Re: Write to txt file with constant tab size

$
0
0

Change your file extension from .txt to .tdl. That will let Excel open the file and will show the data properly formatted, and Matlab can still read it in as tab-delimited.

 

(tdl = tab delimited file, like csv = comma separated values)

Re: DAQmx choose channel to display on different waveforms

$
0
0

Thank you for your response! I'm currently working on the Producer/Consumer loops. I have a question about concatenating the array of data. I tried that and it seems like it kind of fixes the logging problem but the data is now in a single column instead of 8 columns for each channel. I'm looking for a way to fix that, how can I split that into 8 columns for each channel separately? 

 

Thank you!

Re: Communicating with specific pins of a serial port?

$
0
0

The 7114 has inputs called "balanced" and "unbalanced":

 

https://aetechron.com/pdf/7114manual.pdf

 

Do you know what they mean by those terms in this context?  I'm guessing the balanced is a differential signal where the minus is the inverse of the plus, and the unbalanced is a single-ended signal?  That would suggest to me you want to use the unbalanced and yes any sort of BNC breakout would be convenient:

 

https://www.jameco.com/shop/keyword=Bnc-Breakout

 

I am not clear on what type of signal you want to send to this BNC input on the 7114.

 

You mentioned a 125 kHz signal.  Is this a square wave?  Rectangular wave?  What is the needed low voltage and the high voltage?

 

I'm not sure if this applies to the BNC input, but the manual it says signal input type is AC, level when asserted 10V and level when reasserted 0V.  Confusing.  Does the 10V mean a 10 Vrms sine wave centered around 0 volts?

 

Re: Absolute Time Pulse Generation

$
0
0

Back in msg #17 I linked to another thread I made related to this app.  It gets into more gory details, but you may want to take a closer look over there for some more info.

 

Meanwhile, I tried to do the minimum needed mods to your code that would make it run without error on a *simulated* 6211.

 

I started by neatening and straightening the wires for several minutes.  I can't claim that doing this pays off in every single instance, but I *will* say the habit of neat straight wires *will* be worth your while in the longer run.

 

Next, I added an event structure in the loop so that new pulse parameters get written only when they are changed.  You were iterating your loop at the maximum possible speed, doing thousands of redundant and unnecessary writes.  (And if not for the error you *did* get first, you would have been getting a different one due to trying to overwrite pulse params before they were used.  See linked thread for a little more info.)

 

I got the same error as you.  So I tried updating pulse params by writing to a DAQmx Channel property node instead.  And *that* seemed to work without error on a simulated 6211.

 

Over in the linked thread is similar code that ran on a real 6341 while using DAQmx Write to update pulse params.  So I'm pretty sure that the DAQmx Write approach would work on your own real 63xx device at work.  But since the property node version should work both places, maybe you should go with that for now.

 

In reference to the "quirky behavior" I mentioned in my previous msg, the linked thread code worked on real 6341 hardware when I updated only the *Low* pulse param so I think that's the crucial one.  So that's also why I write it to the property node last (multi-field property nodes execute from top to bottom).  You probably don't need to rewrite the constant 2 High Ticks, but I left it there for now to be more sure things would work.

 

 

-Kevin P

Re: About the memory problem

$
0
0

Your "time steps = 1" input is way to small and will generate 0.25GB of 2D data alone.

 

Set "time steps = -1" and things will work just fine with your data.

 

altenbach_0-1589390535279.png

 

From the help:

 

"National Instruments recommends that you set time steps such that the number of rows in the wavelet coefficients does not exceed 512. If you specify a small value for time steps, this VI might return a large number of wavelet coefficients, which requires a long computation time and more memory."

 

Re: Sampling Rate Problem

$
0
0

Thanks for your answer. How do I solve the time issue? 

 

The way I calculate time is (Current Time - Start Time) and I assume the loop is executing 100kS/s due to the settings I have at the Timing palette. 

Re: LV2017 Application builder issue

$
0
0

Hi Marko,

 

Did unchecking "Modify project library file after removing unused members" resolve the problem for you?  I've just run into this same warning, and unchecking that box didn't change the behavior for me.

 

David


Re: inserting single element into 2d array

$
0
0

 wrote:

 wrote:
That's why I created this.

I am sure it can be simplified dramatically. 😉

(It could even be expanded to work with arrays of any dimensions. Not shown)

 

altenbach_0-1588957253905.png

 

 

(Sorry, I attached wrong code earlier. Disregard that. Please verify correct operation)

 

 

 

 


Here's the whole set, with your improvements.

Re: Queries on 3D Simulation (Rotation)

$
0
0

Hi Mr Yddet,

 

Thank you for your response. There are some questions I would like to ask you.


  1. With the method suggested does it mean that I will only have 1 control to move the robot instead of the usual 2 control (X and Y Axis Speed)?
  2. Does the method work if the robot rotates clockwise?
  3. When do I know to use 2 while loops instead of 1 while loop?
  4. How does Error Handling help with Data flow? The concept is still too foreign to me.

Since you asked, The purpose of this project was meant to create a 3D simulation of a Mobile Robot similar to the physical robot we have at our school lab.

 

The intention was to use this as a way for inexperienced users of the Robot use the simulator instead so as it will not damage the physical robot as it is used for competition.

 

The robot is expected to move in a X Y Axis with rotation which is what I am currently trying to implement. Another thing is that we are planning to find a way to simulate Infrared Sensors to the robot however, I do not even know what to do about it or how to begin as I have no experience at all. I have looked up on sources about the LabVIEW robotics module but to my dismay, my LabVIEW student myRio edition does not have the Simulator palette at all which prevents me from using the built-in simulator provided by LabVIEW.

 

In conclusion with my inexperience in this topic of simulation, I have no clue on what to consider when building a simulator except that it moves around. Implementing complex ideas such as sensor or physics is a whole different level that I will probably turn my hair white

Query on CLAD question from NI/s website

$
0
0

Hello,

 

Can someone tell me how the answer is B as mentioned in the solution ?

 

Thank you in advance,

 

 

 

 

Re: About the memory problem

$
0
0

Thank you for your help . I also try to reduce the length of the signal(one part of signal) . I found an interesting thing . I make the time step to 1000  and reduce the length of the signal . my graph is ok .

 

After you share your tips , my graph(all signal) is also ok  .

 

Your tips are very useful . Thank you  . 

 

 

Re: Query on CLAD question from NI/s website

Viewing all 202541 articles
Browse latest View live