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

Saving a value while changing the input device

$
0
0

Hello all,

 

I'm developing a live audio processing system and currently struggling with the fact that when i switch my input device (from a DAQ Assist input with a encoder to a numeric control on the interface), the numeric value is not stored. So when the user uses the encoder to set a value (f.ex. the volume) and then wants to change the input to the virtual numeric control, a default value is being set.

 

I did some research but didn't find any solution.

 

Find a simple example VI in attachment, I visualized the problem with a numeric indicator and replaced the DAQ Assist with another numeric control. See when pressing the boolean switch.

 

If anything isn't pointed out well or understandable, feel free to ask.

 

Thank you in advance!

 

Best regards,

Konstantin Koehler


Producer consumer state machine communication

$
0
0

I'm programming a RT system with 3 drives which are accessed through the scan engine. 
To control the entire system I have a producer state machine ("Command Loop") and for the drives I've created another state machine  ("Motion Loop") which acts as consumer (see picture).
The Motion Loop gets it's Information passed via a RT shared variable fifo. But I would also like some control over the Motion loop when it's idle. 
I've thought about using the event structure but am not sure if thats the best method.

 

I know LV offers several methods for me to communicate between loops, but is there a recommended method for my case?

 Unbenannt.PNG

 

Double-Click to Open Clone

$
0
0

I'm using LabVIEW 2017. I noticed that double clicking on a re-entrant subVI while the program is running opens the master VI rather than the associated clone (as would happen using previous versions of LV).  This behavior is frustrating and unexpected.  Is there a way to change the default behavior?

Help needed connecting LabVIEW to the Bluehill 3 API

$
0
0

Hello

 

I need to write some LabVIEW code to auto populate some fields within the Bluehill 3 software that runs an Instron servo-hydraulic testing system.  The code will retrieve relevant data from a database and then fill in the required fields in the Bluehill 3 software prior to testing.  The database connectivity side of things is fine, but I'm having real problems getting LabVIEW to communicate with the Bluehill 3 API - this is what I would appreciate some guidance with.

 

Details of the basic set-up :

 

 - Using LabVIEW 2016 32-bit software on the development machine.

 - Using Bluehill 3 software (v3.72.4715) which uses the .NET Framework 4.5 for the API.

    (Note Bluehill 2 uses ActiveX for it's API, I believe, for which any examples are not usable here)

 - .NET Framework 4.7.02053 installed on development machine (assume this covers the .NET 4.5 requirement?)

 - CLR v4.0.30319 installed on development machine.

 - I'm running Bluehill 3 in stand-alone mode, since I don't have the luxury at the moment of developing the software on the pc running the Instron (Instron have told me this should not be an issue as far as the Bluehill API is concerned).

 - Within the Bluehill 3 software, I have the 'BluehillWCF' selected as the API type.

 

What I have done :

 

Via the LabVIEW .NET connectivity palette I can use the Invoke Node to read the BluehillWCF.dll and create a method called APIHeartbeat.  This is a boolean which returns True if there is a Bluehill WCF service available, so that is what I want to achieve i.e. check there is a link.  I have used a Constructor as a reference to the Invoke Node, see below.

 

Simple .vi to test communicationSimple .vi to test communication

Whilst Bluehill 3 is running, I would expect a true value, but I cannot get this to work.  Of concern is the note that "Version=0.0.0.0" and "PublicKeyToken=null" shown the pic above, which appears when I hover over the Constructor or the Invoke Node blocks. I've read elsewhere there should not be a null key value, and the zero Version number does not seem right!

 

The code seems to be reading the .dll fine since it shows all the Methods available... 

 

Methods availableMethods available

I've tried selecting other Methods to see if I can get a useful output, but I cant. 

 

The details for the .NET assemblies seems to be ok, I think...

 

Assemblies in memory infoAssemblies in memory info

The BluehillWCF.dll path is the default path as set when the Bluehill software is installed.  I've tried moving this to the top level .vi location, but this does not seem to help (i read elsewhere on the forum it might).  I've also read that maybe the API needs to be 'strongly named' to create a key but I'm not sure exactly how to do this or even if it is necessary.

 

I've looked at other postings regarding communication between the Bluehill 3 API and LabVIEW, but I cannot see anywhere that anyone has had any luck.

 

Any help with this appreciated since I am a .NET novice and I'm not sure what to do next.

 

Owen K. 

Using a TypeDef from a TypeDef

$
0
0

LV2013 (moving to 2017 soon). LVRT

 

I have a TypeDef called "Units".

It's an ENUM, with 40+ values, like "DegC, DegF, kPa, Pa, MPa, etc...

 

The user sets a given channel to have certain units, units are displayed when they plot that channel, sometimes units are converted for analysis.

 

As a CONTROL, I want it to match my other controls - 15 pt black normal font.  I have maybe 10 instances of that.

 

As an INDICATOR, I have maybe 30 instances where I want it to be bold yellow italic 15-pt font.  Maybe 30 other instances where I want it to be bold yellow italic 20-pt font.

 

I had all this set up nicely, but now I had to make a change to the location of the typedef, so it broke every instance.  When I relink them, they all revert to the master copy.

 

What I want is a sub-Typedef, where the CTL includes a copy of the original, but changes the font.  So each window would use an instance of the original, or an instance of the little yellow one, or the big yellow one, as needed.  Then If I changed the list of units, all would follow suit.

 

But LV2013 will not let me do that. A TypeDef cannot start with another TypeDef.

I want to avoid type conversions, if they cost time.  I could cluster a new typedef, but that means bundling / unbundling.

It has to work on RT, since some of the display clusters might be used on RT, simply as connections.

I could live with two or three separate TypeDefs, if i could easily copy the list of items from one to another.

 

Any ideas?

 

how to get and display max number

$
0
0

hi

 

i want to get and display max number if i move slider up/down and should be reset if i press button.

 

Thanks,

How Labview 2017 Works with a Volume License Server

$
0
0
Hello,
I'm a technician in a high school.
I need to install Labview 2017.
For this I have installed NI Volume license manager 3.1 on our license server.
Then I installed the .lic license file sent by NI Agreements.
Then I install Labview 2017 on the client computer in evaluation mode.
On the client, in the license manager, I add my license server which finds my network licenses.
But when I restart the client again, the customer always asks me to activate.
How do I make the client use the licenses available on the NI license server?
Thank you very much for your help.
cordially

Vision Builder AI 2014 / LabVIEW 2015

$
0
0

I have LabVIEW 2015 installed  from NI Developer Suite DS1 - Spring 2016, and the VIs for Vision Builder AI do not appear in the function palette.

20144.png

I still have available LabVIEW 2014, and they are available here.

Is there a way to have them available in LabVIEW 2015? 

 

2015.png

Thanks

Edgar.


Voltage fluctuations using cDAQ 9174 with NI-9220 module

$
0
0

Hello,

We are using a cDAQ-9174 with a NI-9220 input module. I am reading from 4 channels with one DAQ assistant express vi to test before inserting into bigger project. This is a small portion of a larger project but we cannot get stable readings with 3 of our sensors. 1 is a power transducer to record watts, another is a voltage transducer for volts and the last is a Monarch tachometer. There is a current transducer that is working properly. The readings do give accurate readouts at certain times but will then spike down to near zero volts randomly, the tach not as often as the others. I switched channels with one of the signals giving "bad" readings with the "good" one and the fluctuations are not particular to a channel but follow the signal being measured. I used the Measurement and Automation Explorer Test Panels and it fluctuates in that as well. I've also checked with a very good DMM at the terminal blocks and on the plug side that plugs into the NI-9220 module and those voltage readings are accurate and do no fluctuate. I'm not sure what else to try so any input and help is greatly appreciated. I have attached an image of how bad the fluctuations are but if you'd like anything else just let me know. Thanks for your help!

 

Voltage fluctuations_graphs.PNGLabVIEW Test Panel_Channel AI0.PNG

XNET Linbus application - how to set up with cDaq and NI 9866?

$
0
0

Hi folks,

 

I am new to LIN Bus and to XNet and I am trying to to control an linear motor with LabView (2015) The motor only has two "Commands" and I would think this is a very simple task. Is there any beginners documentation? My motor remains quiet and I have already tried al lot. I looked also at the examples, but this was also not helpful.

 

I defined frames of different length in the database. I told my ecus which frame has to be send and which one has to be recceived. And I created sessions to do queued input or output.

 

I seem to misunderstand something, since I get error messages about property values which are not set correctly (do I have to check al property values?) and no data from my linbus device.

 

Ho can I send a frame to a slave which is filled up by it and how can I address a telegram to a slave which works as static command? Do I have to provide the checksum myself or is this done automatically?

 

 

Get Object Reference by Bookmark ID

$
0
0

It is not clear where Bookmark ID (a U32 numeric) can be accessed to use the GetObjRefFromBkmrkID invoke node. I understand there is an app invoke node, "Get VI.Bookmarks" that outputs the "Bookmark Reference" (also a U32), is this equivalent to the VI Bookmark ID. So if name my book control is named #stop, use the App Bookmark Reference output into GetObjRefFromBkmrkID to get the control reference...correct or not?

 

I see David_L explains here but he's not clear on this issue.

LabVIEW example for CAN bus Ethernet interface

$
0
0

Hello everyone,

 

I was wondering if anyone could help me get started with a LabVIEW example to program simple read and write vi to communicate with a CAN bus via an ethernet converter. I have a CAN bus to Ethernet converter connected to my computer. At this stage I am not even sure if to use VISA. I created a TCP/IP VISA resource and I can connect to my converter via the VISA Test Panel. But, I would like to utilize some of the already existing LabVIEW CAN software - if that's even possible.

 

Any tips or suggestions on how to proceed, or even better any code examples would be greatly appreciated !

Thank you! 

Boolean Control inside a While Loop inside an Event Structure

$
0
0

I want to stop my program using a Boolean Control inside a While Loop inside an Event Structure.  Why does this example program not work?

 

Thanks, Matt

Combinational robot

$
0
0

i have written a code using arduino for a robot and i am using Labview to send data so tat based on tat it does the required operations . My code is working properly but whenever i send data rx pin on arduino blinks but at d 1st click it never does the required job and i need to click it twice or thrice to make it work the way i want it to.Pls do help me out

Rate and samples to read when continuously acquiring data

$
0
0

I'm trying to understand the function of the parameters "rate" and "samples to read", when continuously acquiring data. I've made a simple VI where I'm continuously acquiring data from a simulated device (NI-9237) for a set amount of time (2 seconds). Initially I thought that the number of elements in the array would be equal to the rate * seconds that the VI is running. So if my sample rate is 2000 hz for 2 seconds I should have 4000 elements. Instead I'm seeing that the number of elements is equal to the value I set as the "number of samples". Can someone explain what I'm doing wrong? My end goal is I want to be able to acquire a pre-determined amount elements, thanks.

image.png

 

 


Clarifying Understanding of Fail-Safe Control Reference Design for CompactRIO

$
0
0

Hello all

I am somewhat new to LabView FPGA/RT and am having a hard time understanding the logic behind this NI provided code. Here is the original source: http://www.ni.com/example/30984/en/. 

I have come to the conclusion that the following process occurs. If anyone could check my understanding it would be appreciated.

 

 


My understanding of the logic behind the code:

1) The RT VI uses a Read/Write control to write the user inputs (Enable RT Watchdog, RT Reset on Watchdog Failure?, and RT Timeout Period) to the FPGA.
2) The RT VI reads the current state of the output modules (these are stored in an array called "Analog Control Inputs" along with separate boolean inputs labeled DI1, DI2, and DI3.

3) Using user entered parameters, the RT VI uses a PID controller to gradually ramp the current value of the output modules (Analog Control Inputs and DI1, DI2, and DI3 which were read from the FPGA VI) to the user entered set points.

4) The output of the PID controller is then sent to the FPGA via a Read/Write control (the explicit names are "Analog Output Control" which are the new values the Analog Output modules are to output), the new values for all the boolean values are sent as well, and, assuming the process ran correctly, the "Pet RT Watchdog" and "RT Safe" variables are set to the appropriate values to indicate to the FPGA everything went according to plan.


On the FPGA side:

1) Both input loops take the current state of the C-Series output Modules and store them to the front panel indicators which are read in from the RT VI. The loops see what value they are currently outputting.
2) The Output loop waits the given update period, then feeds the appropriate values into the C-Series Output Modules (either the programmatically defined safe state [active during the "Safe State" option] or the user entered values [active during the "Normal Operation" option]). This changes the C-Series output values to the programmatically defined safe state or the user entered values. The Output loop then tests to see if it should go into Safe State or Normal Operation and carries that over to the next iteration of the loop.
3) The RT Watchdog loop monitors the RT software watchdog. If "Enable RT Watchdog" is true, it checks to make sure the time between pets of the RT watchdog occur within the user entered time interval. If a time out occurs, the "Watchdog Safe" variable is set to false, effectively indicating the Output loop to activate "Safe State". Finally, the RT System is reset if the user set "RT Reset on Watchdog Failure" as true.


Thank you to all who read this far! 

Vis broken when moved from LV2015 32 to 64 bit and vice-versa

$
0
0

I have this large set of files under revision control.

Check them out on a Windows 7 Enterprise 64 bits, open them with LV2015 SP1 f10, 64 bits, everything is fine.

Check them out on a Windows 7 Enterprise 32 bits, open them with LV2015 SP1 f10, 32 bits, one VI is missing!  Selecting replace and navigating to the subdirectory where the file is, everything is fine again.

Copy the missing file, the calling file and its caller (the top level) over to the 64 bit system, another file has a bad linkage.

Rinse repeat.  How can I even find what's wrong?

Running multiple 2204A Picoscopes in Labview

$
0
0

I am working on a project in Labview that requires 4 different stations (all of which have a pisoscope connected to read from my parts) to be running off of the same computer. The program I am writing identifies only 1 of the picoscopes connected to my computer. I am trying to figure out a way to connect each station to a specific picoscope instead of the program choosing a random one I am connected to. Thanks for the help!

Setup of Robotics for Tracks not Wheels

$
0
0

I am tasked with writing the controls for a autonomous robot using a cRIO to control a BobCat.  I developed a prototype on an electric wheelchair base.

 

My issues:

  1. The wheel chair robot is simple:  Two Fixed Wheels with Differential steering
  2. The Bobcat has tracks which have about 8' of contact with the ground.  I have searched high and low for even a mention of tracks instead of wheels and can't find anything.  the SD6 just treats them as round wheels which for its size is fine. my main question is that if I treat it as a round wheel where is the "point of contact"?  Intuitively I think can move depending on a lot of variable.

Does anyone have any suggestions or experience?

want to ignore some points for input

$
0
0

Hello guys, 

 

Now I have a control to a port, the range will be from 0 to 360. However, I want to ignore some points. If the value is from 0 to 1, output 1. If from 89 to 90, output 89. If from 90 to 91 output 91. If from 179 to 180, output 179. Just like this way, also do points near 270 and 360.

So basically, it require the value near certain points coerced to a value.

 

Anyway to solve this?

 

Thanks 

Viewing all 67020 articles
Browse latest View live


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