Working with Array of Cluster with Graph- the auto scale discussion

Discussion on working with Graph inside an array of  cluster.

 

LVGCAry_Slide1LVGCAry_Slide2LVGCAry_Slide3LVGCAry_Slide4LVGCAry_Slide5LVGCAry_Slide6

Posted in Test Sector | Tagged , , , | Leave a comment

Creating Clusters from the FP LV2019

Create cluster from control in Front Panel of vi via Create-Cluster from Selection

IDE used: LabVIEW(®) 2019

FPCCFS_Slide1FPCCFS_Slide2FPCCFS_Slide3FPCCFS_Slide4FPCCFS_Slide5FPCCFS_Slide6FPCCFS_Slide7FPCCFS_Slide8FPCCFS_Slide9FPCCFS_Slide10


 

LabVIEW® is a National Instrument product
This post is not connected or endorsed by any company.
Created to spark ideas on the subject.
Use at your own risk.

Posted in Test Sector | Tagged , , , | Leave a comment

Create Event Case from Front Panel LV2019

I did not see this the the previous LV that i was using 2015, but in LV2019 their is a way to create event case  for object (ex buttons) from the “front panel” and it even put the button inside the event case which is important for proper function of buttons.

EventLV2019Slide1EventLV2019Slide2EventLV2019Slide3EventLV2019Slide4EventLV2019Slide5EventLV2019Slide6EventLV2019Slide7

EventLV2019Slide8


 

LabVIEW® is a National Instrument product
This post is not connected or endorsed by any company.
Created to spark ideas on the subject.
Use at your own risk.

Posted in Test Sector | Tagged , , , | Leave a comment

LV 2D Array to Table as Color Map

Showing a way to convert 2D array to a color map

Array cannot have individual colors but Table allow individual Back Ground Color

I interesting item is when the Array is changed I can get the Array.Element(its value) but I could not find the updated Element indexs info . However the NI Forum had a solution which is what i need with some changes.

Here is the NI help  topic used:

https://forums.ni.com/t5/LabVIEW/Detect-array-position-of-a-value-change/td-p/3767810?profile.language=en

Update All Button

LV 2D to Table for Color Map- showing result of Update AllLV 2D to Table for Color Map- showing code of Update All

Clear Map button

LV 2D to Table for Color Map- showing result of Clear AllLV 2D to Table for Color Map- showing code of Clear All

Change to the number (change value)

LV 2D to Table for Color Map- showing ArrayR5C2LV 2D to Table for Color Map- code ArrayCell Change

 


 

LabVIEW® is a National Instrument product
This post is not connected or endorsed by any company.
Created to spark ideas on the subject.
Use at your own risk.

Posted in Test Sector | Tagged , , , | Leave a comment

Provide the operator with a Dialog for task which take time to complete.

Sometime a process take time to complete. Its would be a good idea to provide the operator with a dialog and show a time in seconds so they know the application did not have an issue.

Development system used: LabVIEW(r)

Provide a Dialog to Operator for task which

Front Panel (also showing input and output which are not normally shown to operator

but show for completeness.

LV Dialog-Show all front panel

Code

LV Dialog Operator Please Wait

Changing the Seconds for n.n format

seconds display format

One Decimal point

Set Seconds indicator for 1 decimal place

Setting module to appear as a dialog.

Set Windows Appearance to DialogLV Dialog Set window size for operator

Testing of Dialog

Testing of LV Dialog

Screen Capture before timeout (above was final) below shown with control as constant

so its easier to see matching info.

LV Dialog Testing in another Module

Dialog appearance as a LV Dialog

Final Appearence Size


 

LabVIEW® is a National Instrument product

This post is not connected or endorsed by any company.

Created to spark ideas on the subject.

Use at your own risk.

 

Posted in Test Sector | Tagged , , | Leave a comment

LV Arduino Serial Comm and K0183 Shield

Communicating to Arduino with a K0183 Keyestudio shield , both serial read and serial write. In this example using the RGB leds on pin 9,10,11.  The shield had an RGB Led and is used just to show control of it’s LED . You can use this kind of serial comm for controlling other shields or connected devices with some modification.

LV Arduino Serial RGB K0183 shield CodeLV Arduino Serial RGB K0183 shield FP

100,0,0    Red

Red Led_RGB

0,100,0  Green

Green Led_RGB

the blue light did not look good on my camera so i did not add it.

below is the modified code used with above LV and K0183 Keyestudio shield.

 

=

<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span>
/*
  Reading a serial ASCII-encoded string.

 This sketch demonstrates the Serial parseInt() function.
 It looks for an ASCII string of comma-separated values.
 It parses them into ints, and uses those to fade an RGB LED.

 Circuit: Common-Anode RGB LED wired like so:
 * Red Cathode: digital pin 9
 * Green Cathode: digital pin 10
 * Blue Cathode: digital pin 11
 * Anode : GND
 *
Used  example- communication - ReadASCIIstring code as starting point  (changed for Common Anode)
 created 13 Apr 2012
 by Tom Igoe
  modified 14 Mar 2016
 by Arturo Guadalupi

modified from original example for K0183 Keyestudio shield
 by AC 2019
 This example code is public domain.
 */

// pins for the LEDs:
const int redPin = 9;
const int greenPin = 10;
const int bluePin = 11;

void setup() {
  // initialize serial:
  Serial.begin(9600);
  // make the pins outputs:
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
  Serial.write("R,G,B   example type 100,10,10 then press Send\n"); // help line
}

void loop() {
  // if there's any serial available, read it:
 // Serial.write("R,G,B   example 100,10,10");
 // if there's any serial available, read it:
  while (Serial.available() &gt; 0) {

    // look for the next valid integer in the incoming serial stream: n,n,n
    int red = Serial.parseInt();
    // do it again:
    int green = Serial.parseInt();
    // do it again:
    int blue = Serial.parseInt();

    // look for the newline. That's the end of your
    // sentence:
    if (Serial.read() == '\n') {
      // constrain the values to 0 - 255 and invert
      // if you're using a common-cathode LED, just use "constrain(color, 0, 255);"
      red = constrain(red, 0, 255);
      green = constrain(green, 0, 255);
      blue = constrain(blue, 0, 255);

      // fade the red, green, and blue legs of the LED:
      analogWrite(redPin, red);
      analogWrite(greenPin, green);
      analogWrite(bluePin, blue);

      // print the three numbers in one string as hexadecimal:
      Serial.print(red, DEC);
      Serial.print(",");
      Serial.print(green, DEC);
      Serial.print(",");
      Serial.println(blue, DEC);
    } //cr

  }//serial data to read
}//loop

=


being able to control the arduino actions via comm port with labVIEW saved me on a couple of projects with last minute changes.

 


LabVIEW® is a National Instrument product

This post is not connected or endorsed by any company.

Created to spark ideas on the subject.

Use at your own risk.

 

Posted in Test Sector | Tagged , , , | Leave a comment

Extracting section from a comma separated value file

Showing a way to extract the section from a comma separated value (csv) file.

Using LabVIEW 2019

and a example created CSV

One interesting thing was found to find the first [ of the section needed to use \[ or [[.

but the  “]” did not need it.

CSV_Find_sectionCSV_Find_section_code

CSV file


 

 

 

LabVIEW® is a National Instrument product

This post is not connected or endorsed by any company.

Created to spark ideas on the subject.

Use at your own risk.

Posted in Test Sector | Tagged , , , , , | Leave a comment

LV Cluster to 2D string

 

 

A method to turn a Cluster(s) into a Section – Key – Value.

Created to spark ideas on turning LV cluster to 2D String using only LV’s  Data Parsing and properties.

In the DataType case structure the following was decode String,Numeric,double,path which is a small subset of Data Types available in LabVIEW

What was used

  • Two simple clusters
  • LabVIEW 2019 ®

Cluster to 2D str code

Front Panel        Input Left      Output RightClsuter to 2D Str Output

 

 

 


LabVIEW® is a National Instrument product

This post is not connected or endorsed by any company.

Created to spark ideas on turning LV cluster to 2D String.

Use at your own risk.


 

Posted in Test Sector | Tagged , , | Leave a comment

LV Search strings in 1D Array

Show two search for string in array where you need to also get the index in the array.

FindStrIn1DArrayLV Search String 1D

Output of Find Strings in Array

Output of Find Strings in Array Not Found

 

 


LabVIEW® is a National Instrument product
This post is not connected or endorsed by any company
Use at your own risk

 

Posted in Test Sector | Tagged , , | Leave a comment

Building Array Conditionally in LV

Showing some methods of building array conditionally in LabVIEW®

Code (4 methods shown)

LVBuildArrayMethodsCode

 

Data Out from the above code

LVBuildAryMethodDataOut

Starting point help for text base method:

NI Forums

https://forums.ni.com/t5/LabVIEW/Array-Handling-in-Formula-Node/td-p/2198532?profile.language=en

 


LabVIEW® is a National Instruments product.
This post is not connected with or endorsed by any company mentioned.
Use at your own risk.

 

 

Posted in Test Sector | Tagged , , , | Leave a comment