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

resistance measurement

$
0
0

Hello everyvone,

i have a PXIe System and want to do a resistance measurement.

When I start the DAQmx, it doesn't find any physical channels, what can be the point, or which driver should I reinstall?
It is a Network connected System so Maybe this could be the Problem?!

 


usb-8451 on labview 2019

$
0
0
Until now I was working on labview 2018 with NI-845x 18.0 driver
now I upgraded my labview version from 2018 to 2019 but theCan not Install NI-845x driver.
I looked at the site and saw it:

Application Software Support

This version of NI-845x supports the following application software versions, including service packs. If you are not using NI application software, refer to Microsoft Visual Studio Support.

Application SoftwareVersions Supported by NI-845x
LabVIEW2015, 2016, 2017, and 2018

LabWindows™/CVI™

2012 and later

 

It is possible to work with the device in version 2019 anyway?

 

 

 

FPGA - custom filter decreases sampling frequency by half

$
0
0

Hello,

 

I've been designing an FPGA filter (compactRIO) for multiple channels, with BP IIR filter and RMS extraction over a period of time. It is enclosed in while loop and its iteration I believe is set strictly by reading from modules at its sampling frequency (102400 Hz for NI 9232). The problem is that when I introduce this filter, sampling frequency drops to 51200 Hz. As this cannot be tested in simulation, I tried simply disabling the filter with Disable structure and I had to compile FPGA for both scenarios. I cannot figure out what has gone wrong, could you take a look at the code? Is  There is nothing I see that would cause the delay.

 

Thank you.

 

Main VI:

Výstřižek.PNG

Filter itself:

Výstřižek2.PNG

(not me in the picture)

intergare segnale su finestra temporale mobile

$
0
0

Salve,

sto cercando di implementare un algoritmo che integra in modo discrteo un segnale rispetto a una finestra mobile. Questo algoritmo che prima lavorarava con il segnale acquisito vorrei ora farlo lavorare in real time. Se però campiono in un ciclo while a ogni ciclo i dati si riscirivono e non riesco a muovere la mia finestra di integrazione in maniera continua punto a punto. Vorrei capire come fare.

 

Grazie

Join images as panorama

$
0
0

I have M rows and N columns of images. My aim is to convert it into final joined images. These images have no overlap. I want my final image as panorama based on M rows and N columns. Images are selected from folder.

I have attached program. But not getting result.

NI VISA Error -1073807343, port COM et retour arrière

$
0
0

Bonjour.

 

Dans le cadre d'un projet de  création d'un banc d'investigation, je me retrouve confronter à un problème.

 

J'ai créer plusieurs VI pour aboutir a une fenêtre de mise sous tension ( je pars d'un HUB de sélection de carte à tester, une fois la carte sélectionnée, une fenêtre de sélection de test apparait, une fois le test voulu choisi, l'utilisateur à le choix d'une mise sous tension, via un booléen. Façon poupée russe).

 

En premier lieux, je fais des essais sur DELs.

Une fois que l'utilisateur appuie sur le bouton, une diode posée sur une plaque Labdeck s'allume. Une carte Arduino MEGA, fait l'intermédiaire entre le LabVIEW et la DEL. L'Arduino est programmé avec un Switch Case (comprendre que sur l'ensemble des diodes placés sur la plaque (7 au total), celle correspondante à la valeur indiqué sur le VISA correspondant au test, doit s"allumer.

 

Mes problèmes sont les suivants:

- Sur la version 2018 de LabVIEW, ma valeur demandé sur VISA n'est pas reconnu automatiquement (l'affichage m'affiche un carré plutôt que la valeur numérique demandée. Valeur exprimée en héxadécimal). Sur la version 2017 du LabVIEW je n'avais pas se problème.

- Lorsque je suis l'arborescence de mon ensemble de VI (je pars de mon HUB pour arriver à ma fenêtre de test), si je tente un retour en arrière, un message d'erreur s'affiche avant de fermer la dite-fenêtre(message "1073807343").

- Idem, une fois arrivé sur ma fenêtre de test, le port COM correspondant à mon arduino n'est pas sélectionnée par défaut. Si je tente de le modifier alors que le VI est en fonctionnement, le changement n'est pas pris en compte. Si j'arrête la simulation du VI et que je parviens à changer de port COM, une fois que le VI le valide, mon bouton retour ne permet plus un retour à la fenêtre précédente, mais réinitialise simplement la fenêtre de test sur laquelle je me trouve, avec le retour des inconvénients initiaux.

 

Je suis relativement débutant avec LabVIEW, cependant j'ai quand-même tenter de diagnostiquer l'origine des causes. Notamment avec NI MAX pour l'attribution des COMs sans que cela ne change quoi que ce soit. je ne peux pas utiliser le troubleshooting, car ce dernier ne reconnait pas mon NI VISA et SERIAL.

 

Devant l'impasse dans lequel je me trouve, je souhaite savoir si parmi vous, il y en a qui puissent m'aiguiller sur la démarche à suivre.

 

D'avance merci.

Parallel data aquistion from ethernet and DAQ

$
0
0

Hi Guys,

 

I have made a labview program that controls a motor and acquires data from two sensors. when I use daq for both sensors it works fine but when I use the program given by the company for data acquisition via ethernet my data collection slows down significantly.

The whole program is divided to 5 while loops

1. Motor control

2. data acquisition from DAQ

3. Data aquisition from ethernent

4. Data writing 

5. image aquisition from camera

 

So I know for a fact that this is because of the section I added for Ethernet becuz without that using daq everything works perfectly but idk how I can optimize the speed. moreover the ethernet section works fine but the daq is slowed down.

I would appreciate any recommendations. 

Filter Bad Linkage

$
0
0

So I am working on a project and I hat to modify the already existing filter so that the user can modifythe topology and type of the filter prom the block diagram of the main VI. But I did something wrong and now even the original filter is broken and it is showing me this error. What can I do? Everything is connected as it shows in the context help window.Untitled.png 


LabVIEW 2019 Linux - downloag page bug

$
0
0

Visiting the LabVIEW 2019 download page, the LabVIEW 2019 download for Linux is found by mistake.(lv2019full-linux-mac.iso)
https://www.ni.com/es-cr/support/downloads/software-products/download.labview.html#305931

Due to my poor Internet connection I can not prove if what I have detected is true.

I imagine that it is a mistake of the NI web programmers.

After a few hours later they blocked the download link but it is still not completely solved and any user can access their servers and download the software directly.

I estimate that people from NI will correct this bug soon.

I estimate that people from NI will correct this bug soon.

Seting the RepCapIdentifier of an IVI driver

$
0
0

Hello

 

I have created a LabVIEW driver using the LabWindows/CVI FP importer.

 

The IVI-C prototype of the attribute setter for string attributes is:

ViStatusAqSsoct_SetAttributeViString(ViSessionVi,ViConstStringRepCapIdentifier,ViAttrAttributeID,ViConstStringAttributeValue
);

 

I have found how to access the property in LabVIEW using the Property Node but how should I set the RepCapIdentifier?

 

Regards

Yannick Willener

How to load/burst two capture waveforms simultaneously

$
0
0

I'm trying to load two waveforms on he PXIe-6570 using LabView 2014 SP1. I can load one but when I try to load a second waveform on a different pin, I get the following error,

 

-1074118601 The waveform to be captured have inconsistent configurations. Ensure that all capture waveforms used in the patterns to be burst have the same configuration.

 

The Waveform Configuration for each one looks the same as does the period of the waveforms, 1us. The pin is different as required. Once passed this error, I'll attempt to capture the ser_data waveform and display the results in an array.

intergare segnale su finestra temporale mobile

NI VISA Error -1073807343, port COM et retour arrière

$
0
0
Duplicate post in wrong forum. Merged with original thread in French forum.

Windows7 から windows 10 にアップデートするときの注意点

$
0
0

お世話になっています。

 

PC更新のため、Windows7 64bit版にインストールしている

Labview 2017 32bit版を 、改めてWindows10 PCへインストールする

作業が必要になりました。

Windows10 は 64bitで問題ないと考えて良いでしょうか?

 

次の内容を確認していますが、実際にインストールしてからでないと、

どのようなトラブルが発生するかわからないと思っております。

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kGWFSA2&l=ja-JP

 

よろしくお願いいたします。

Get Text-Files (xxxx.txt) Data from Arduino via FTP

$
0
0

Hello Forum,

 

I've an Arduino running as an datalogger and I want to Display the data in LabVIEW. On my Arduino runs a FTP-Server that can send data (Text-Files) to my computerdisc. I'm using FileZilla-Server as FTP-Server.

Now I want to get the datafiles without FileZilla just with LabVIEW. 

 

Did anyone has an example for providing a FTP-Server in LabVIEW. My idea was, that I sent the filename via TCP to my Arduino and I get the datafile back. 

 

Before I put the Code togther I'll want to test it alone with LabVIEW. 

 

Thanks in advance.

 

Arduino FTP Code

/*
   FTP passive client for IDE v1.0.1 and w5100/w5200
   Posted October 2012 by SurferTim
   Modified 6 June 2015 by SurferTim
*/

#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>
// comment out next line to write to SD from FTP server
#define FTPWRITE

// this must be unique
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x59, 0x67 };  

// change to your network settings
IPAddress ip( 192, 168, 2, 2 );    
IPAddress gateway( 192, 168, 2, 1 );
IPAddress subnet( 255, 255, 255, 0 );

// change to your server
IPAddress server( 1, 2, 3, 4 );

EthernetClient client;
EthernetClient dclient;

char outBuf[128];
char outCount;

// change fileName to your file (8.3 format!)
char fileName[13] = "test.txt";

void setup()
{
  Serial.begin(9600);

  digitalWrite(10,HIGH);

  if(SD.begin(4) == 0)
  {
    Serial.println(F("SD init fail"));          
  }

  Ethernet.begin(mac, ip, gateway, gateway, subnet); 
  digitalWrite(10,HIGH);
  delay(2000);
  Serial.println(F("Ready. Press f or r"));
}

void loop()
{
  byte inChar;

  inChar = Serial.read();

  if(inChar == 'f')
  {
    if(doFTP()) Serial.println(F("FTP OK"));
    else Serial.println(F("FTP FAIL"));
  }

  if(inChar == 'r')
  {
    readSD();    
  }

}

File fh;

byte doFTP()
{
#ifdef FTPWRITE
  fh = SD.open(fileName,FILE_READ);
#else
  SD.remove(fileName);
  fh = SD.open(fileName,FILE_WRITE);
#endif

  if(!fh)
  {
    Serial.println(F("SD open fail"));
    return 0;    
  }

#ifndef FTPWRITE  
  if(!fh.seek(0))
  {
    Serial.println(F("Rewind fail"));
    fh.close();
    return 0;    
  }
#endif

  Serial.println(F("SD opened"));

  if (client.connect(server,21)) {
    Serial.println(F("Command connected"));
  } 
  else {
    fh.close();
    Serial.println(F("Command connection failed"));
    return 0;
  }

  if(!eRcv()) return 0;

  client.println(F("USER myuser"));

  if(!eRcv()) return 0;

  client.println(F("PASS mypassword"));

  if(!eRcv()) return 0;

  client.println(F("SYST"));

  if(!eRcv()) return 0;

  client.println(F("Type I"));

  if(!eRcv()) return 0;

  client.println(F("PASV"));

  if(!eRcv()) return 0;

  char *tStr = strtok(outBuf,"(,");
  int array_pasv[6];
  for ( int i = 0; i < 6; i++) {
    tStr = strtok(NULL,"(,");
    array_pasv[i] = atoi(tStr);
    if(tStr == NULL)
    {
      Serial.println(F("Bad PASV Answer"));    

    }
  }

  unsigned int hiPort,loPort;

  hiPort = array_pasv[4] << 8;
  loPort = array_pasv[5] & 255;

  Serial.print(F("Data port: "));
  hiPort = hiPort | loPort;
  Serial.println(hiPort);

  if (dclient.connect(server,hiPort)) {
    Serial.println(F("Data connected"));
  } 
  else {
    Serial.println(F("Data connection failed"));
    client.stop();
    fh.close();
    return 0;
  }

#ifdef FTPWRITE 
  client.print(F("STOR "));
  client.println(fileName);
#else
  client.print(F("RETR "));
  client.println(fileName);
#endif

  if(!eRcv())
  {
    dclient.stop();
    return 0;
  }

#ifdef FTPWRITE
  Serial.println(F("Writing"));

  byte clientBuf[64];
  int clientCount = 0;

  while(fh.available())
  {
    clientBuf[clientCount] = fh.read();
    clientCount++;

    if(clientCount > 63)
    {
      dclient.write(clientBuf,64);
      clientCount = 0;
    }
  }

  if(clientCount > 0) dclient.write(clientBuf,clientCount);

#else
  while(dclient.connected())
  {
    while(dclient.available())
    {
      char c = dclient.read();
      fh.write(c);      
      Serial.write(c); 
    }
  }
#endif

  dclient.stop();
  Serial.println(F("Data disconnected"));

  if(!eRcv()) return 0;

  client.println(F("QUIT"));

  if(!eRcv()) return 0;

  client.stop();
  Serial.println(F("Command disconnected"));

  fh.close();
  Serial.println(F("SD closed"));
  return 1;
}

byte eRcv()
{
  byte respCode;
  byte thisByte;

  while(!client.available()) delay(1);

  respCode = client.peek();

  outCount = 0;

  while(client.available())
  {  
    thisByte = client.read();    
    Serial.write(thisByte);

    if(outCount < 127)
    {
      outBuf[outCount] = thisByte;
      outCount++;      
      outBuf[outCount] = 0;
    }
  }

  if(respCode >= '4')
  {
    efail();
    return 0;  
  }

  return 1;
}


void efail()
{
  byte thisByte = 0;

  client.println(F("QUIT"));

  while(!client.available()) delay(1);

  while(client.available())
  {  
    thisByte = client.read();    
    Serial.write(thisByte);
  }

  client.stop();
  Serial.println(F("Command disconnected"));
  fh.close();
  Serial.println(F("SD closed"));
}

void readSD()
{
  fh = SD.open(fileName,FILE_READ);

  if(!fh)
  {
    Serial.println(F("SD open fail"));
    return;    
  }

  while(fh.available())
  {
    Serial.write(fh.read());
  }

  fh.close();
}

TCP LabVIEW -> Arduino 

 

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0x90, 0xA2, 0xDA, 0x00, 0x59, 0x67}; //adresse mac de la carte
IPAddress ip( 169, 254, 155, 2 );
IPAddress gateway( 169, 254, 155, 1 );
IPAddress subnet( 255, 255, 255, 0 );
String msg=" ";
char thisChar;
const int led_rouge = 17;
EthernetServer server(3363);

void setup() {
  // initialize the ethernet device
  pinMode(led_rouge, OUTPUT);
  Ethernet.begin(mac, ip);
  // start listening for clients
  server.begin();
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
    digitalWrite(led_rouge, LOW);
  }

  Serial.print("Chat server address:");
  Serial.println(Ethernet.localIP());
}

void loop() {
  // wait for a new client:
  EthernetClient client = server.available();

  // when the client sends the first byte, say hello:
  if (client.connected()) {
    if (client) {
      if (client.available() != 0) {
        thisChar = client.read();
        msg = String(msg + thisChar);
      }
      Serial.print(msg);

      if (msg == "49") {
        digitalWrite(led_rouge, HIGH);
        delay(1000);
      }
      else
      {
        digitalWrite(led_rouge, LOW);
      }
    }
  }
}

 


Join images as panorama

$
0
0
Merged with earlier post with Solutions

Highlighted Text Button Bug with NXG Style Controls in Current Gen LabVIEW 64-bit

$
0
0

I'm using LabVIEW 2018 64-bit and started playing with the NXG controls.  When you mouse over a Text Button, the NXG control highlights.  When you then click the button, it retains that highlighted color (different than the ON state color).  This does not happen when I use a Modern Style Text Button.  See the attached example and the screenshots below. 

 

Capture.PNGSnip.png

 

All buttons have the same mechanical action (latch when released).  To get the front panel in the state shown, simply run the VI and then click the top two buttons in any order.  Note that the NXG Text Button retains a highlighted color while the Modern Button does not.  If you click both NXG buttons, both remain highlighted.  To set the buttons back to normal color, you can resize the front panel window while it's running or tab through the controls.  This does not happen in 32-bit LabVIEW 2018.  I haven't tested other versions.

LV2019 Maps vs. Variant Attributes: Performance?

$
0
0

I would like to know if I should port my existing code using variant attributes to the new LabVIEW 2019 maps. My code is quite performance sensitive.

How do the maps perform relative to the variant attributes?

Is it the same algorithm implementation in the background?

I am especially interested for the case where the values are big clusters (of dynamic size) and the keys are either strings or integers.

loss of data connection VISA and arduino

$
0
0

Hello, I'm developing a program in LV and Arduino. At first I have a serial connection, I need to read the data sent by the arduino serial in LV, it happens that the data is sent very fast and I'm losing the data. This data I use to make a comparison in another function. What am I doing wrong?


image.pngimage.png

Using python for protocol buffer

$
0
0

Hello. I need to use a protocol buffer for communications.

I am trying to use Python tools to serialize message. The function works just fine in Python environment.

I am trying to use Labview to call Python function get the message and put it on UDP port. 

The Python node function requires input for the return data type. Protobuf uses SerializeToString function to generate a string, which is a binary format. 

SerializeToString(self)

source code 
Serializes the protocol message to a binary string.

Returns:
  A binary string representation of the message if all of the required
  fields in the message are set (i.e. the message is initialized).

I am getting errors class 'TypeError" error and no return value. How would I format input for the node function to fix an error.

Viewing all 69511 articles
Browse latest View live


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