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

bug sur excel labview

$
0
0

Bonjour à tous j'ai un bug bizarre dans labview en utilisant activex, je souhaite ecrire dans excel en envoyant un nom d'index  et labview trouve la bonne page sur excel pour entrer les valeurs (dans mon vi c'est les valeurs rlc 2, rcv 2 rit et rpm) dans les colonnes correspondante (il fait une recherche sur la ligne 3 cf fichier classeur 1),

 

là ou ca bug c'est lorsque j'envoie un mauvais nom de page/index, le programme s'arrête bien sur la dernière page, le booléen index not found s'allume correctement mais lorsque je corrige le nom il y a une erreur puis lorsque je relance c'est bon, je pense qu'il y a un bug à la fermeture lorsque l'index n'est pas trouvé car si je veux ouvrir manuellement il se met en lecture seul comme si il était déjà ouvert, une fois l'ecriture effectué correctement je peu ouvrir normalement

 

la partie qui cherche le nom de l'index est la boucle while en bas à gauche du VI, en bas à droite il y a une grosse sturcture condition qui est vrai lorsque l'index est trouvé (dans ce cas tt est ok donc pas la peine d'essayer de comprendre le long code qui est dedans) et est fausse lorsque l'index n'est pas trouvé, il y a juste un passage des ref et msg d'erreur pour aller les fermer

 

je ne comprend pas d'où vient le bug quelqu'un pourrait m'aider svp ?

 

Je vous remercie d'avance 

 

ps:dsl le code n'est pas très "propre", j'espère que c'est quand même lisible


bug sur excel labview

How to single-threaded DLL from multiple EXEs?

$
0
0

I am testing a device via SPI using an Aardvark (USB-SPI). The Aardvark's API is a single-threaded DLL.

 

I want to interface 2 (or more) programs across that SPI channel. For example, one program is an automatic test sequencer, and the second program is a manual register debugger.

 

If I run both programs from the development environment, everything works. The programs share the API handle, and calls from either program will go out to the device.

 

If I create an EXE from both programs, the two programs run as separate Windows applications, so they can't share the API handle, so only one program can use the device. Switching ownership means closing the handle in one, opening in the other, and re-initializing.

 

What are some approaches to make this DLL accessible from both applications when they're built as an EXE?

Moving Executable to a New Computer

$
0
0

Hi all! 

I work as an electrician/IT technician at a manufacturing company and have little experience with Labview and it's associated products but have been tasked with fixing an issue, so please bear with my lack of experience.

 

I am attempting to move an executable from an old Mac running XP in Bootcamp, to a new PC running Windows 7. The executable, associated config file and .dlls have all been moved, as has the .lpd file for OPC Server. The executable itself starts up without any errors, but it doesn't seem to be communicating with OPC Server, or Server isn't communicating with the PLC. 

 

I have no access to the source Labview files, Labview itself, or MAX, as our company did not design the program, so I realize that I'm somewhat limited in what I can change/see/fix. I have attached the executable .ini file and .lpd files in case this helps in troubleshooting. 

 

I appreciate any help you can give! Thanks!

Phase difference for each pulse of square waves

$
0
0

I have the following VI that is used as a subvi to calculate the phase difference between each pulse of two square waves. It works great the majority of the time, but on occasion it will end up throwing out a phase that is in the millions. I'm not seeing anything really jump out at me, and wondering if anyone may see what is causing that issue.

Labview not entering for loop

$
0
0

I have an application that has 2 for loops, in one, I read a tab delimitted txt file, and in the other, I read all files in a folder.

I am trying to compare the names of the files in the csv with the names of the files in the folders, and generate an array, with the last 6 characters of the last folder path.

From what I can understand, my code should work, but it doesn't even enter the first for loop.

Please help me.

Thanks.

Write to measurement file

$
0
0

Spanish:

Hola! Estoy teniendo un problema cuando intento crear un archivo de excel con los niveles de un sistema de 4 tanques por medio del "Write to measurement file", específicamente con la columna del tiempo. Cuando se crea el archivo de excel aparece correctamente el nivel de los tanques, sin embargo, la primera columna "time" aparece en la primera fila una fecha y hora dada y el resto de filas aparece 00:00:00:00. Lo que me gustaría es que cada fila contenga la fecha y hora a la cual el dato fue tomado.

Gracias por su ayuda.

 

English:

 

Hello! I am having a problem when I try to create an excel file with the levels of a 4 tank system by  "Write to measurement file", specifically with the time column. When the excel file is created, the level of the tanks appears correctly, however, the first column "time" appears in the first row, a given date and time and the remaining rows appear 00: 00: 00: 00. What I would like is that each row contains the date and time at which the data was taken.

 

Thanks for your help.

 

 

XControl Update Issue

$
0
0

This morning I ran into an unexpected (for me) limitation of XControls.  If you send data too rapidly to the ControlTerminal of an instance of an XControl, some of it (sometimes most of it) won't get sent.  Apparently if you send data to an XControl while it's still processing the previous data, the new data will be discarded.  I did find a workaround though: If you write to the Value property of the XControl, data will always be passed (I suspect that this is because a property node can wait, but a ControlTerminal can't).  Attached is a Progress Bar XControl; it's supposed to advance the bar every time something is written to it (but it doesn't work correctly of you send data too fast).  My kludgy solution is to have it put up an annoying warning if you run a VI with Progress Bar's ControlTerminal wired to anything.  I would appreciate it if anyone could think of a cleaner solution.


NI-9402 I2C

$
0
0

Hello,

 

I'm having trouble using the NI-9402 module for I2C communication to a sensor (MC3670 accelerometer):

 

My connection:

  1. Connect NI-9402's DIO0 to the sensor's SCL 
  2. Connect NI-9402's DIO1 to the sensor's SDA. 
  3. I am also connecting 3.3V and GND to the sensor's VDD and GND, and made sure the sensor's address is 0x4C.
  4. I'm using the Labview code provided on this website http://sine.ni.com/nips/cds/view/p/lang/en/nid/210637.  

What I'm trying to do:

  1. Write 0x40 to the sensor's register address 0x0D, then read from the sensor's register address 0x0D, which I should read 0x40.
  2. On the scope, I can see that the NI-9402 has read 0x40, but Labview is reporting 0x00.

Troubleshooting on the scope: this is what I'm seeing on the scope = 

0x4C | Write = 0 | Acknowledge by the Slave (MC3672 sensor)

0x0D | Acknowledge by the Slave

0x40 | Acknowledge by the Slave

0x0D | Acknowledge by the Slave | Repeated Start

0x4C | Read = 1 | Acknowledge by the Slave

0x40 | NACK by the Master (NI-9402) | Start Stop

 

The Labview Front Panel is reporting a 0x00 byte read.  It's not seeing this 0x40 as I'm seeing on the scope.

 

Other troubleshooting methods that I tried:

  1. I also connected this sensor to my own microcontroller (MSP430F5529), and I was able to read and write to register address 0x0D.

Attachments:

  1. I'm attaching my Block Diagram and Front Panel

Any help would be appreciated.  Thank you. 

 

 

Merge an Intensity Graph with an image

$
0
0

I have an intensity graph that displays the elevation of the ground.  In some areas the sensor cant see the ground, and in those areas I want to put an image that is an image of the ground.

This is in effect a merger of an overhead photo, with a digital elevation model.

I have the elevation data in a 2D array and plot it in the intensity graphs using a fixed color ramp. This is shown in plot image.

The raw array is 600 by 600, but in this plot only a sub sample of it is shown. (axis are not autoscaled).

I also have an image that is 600 by 600, and another 600 by 600 array that is ether numbers or NaN's.  My initial plan was to sub in image pixel values where there were NaN's.

But this doesn't really work as the intensity graph isn't actually 600 by 600, it includes the axis and a bunch of other stuff.

I can convert the intensity graph to a jpg, then load the jpg, then convert to a RGB array, do the same with the overhead photo and then do a merge using the decisions array, and then convert it back to a RGB picture.  This is shown in the merged example, but because the intensity graph has different extents than the actual data, it doesn't really work.

Any ideas? could I somehow convert just the contents of the intensity graph to an image, that would then have a 600 by 600 extent (at least if it was autoscaled), and merge the contents and then put it back in the intensity graph?  At the end the intensity graph is good as it includes the X and Y axis and shows the scale of the map.

The code example shows the appropriate bit of code I am currently using and image_bits shows the front panel portion of things and the two things that I am trying to merge together.

setting up a color sensor on myrio 1900 for I2C

$
0
0

Hi guy, I am actually having a hard time to find a good example to set up my color sensor for my robot by using  myrio 1900/ I2C, is it possible to give me a good explanation how to use useread andwrite from myrio I2C , especially what does slavery address and byte count , byte reads mean/ corresponding to the attached color sensor datasheet  , I am using 45-2018 model . thank you so much! 

 

dfgg.png

Save Word or Excel File in PDF format using Report Generation Toolkit and Activex

$
0
0

Hello,

I am trying to generate a word file using Report Generation Toolkit. I also want it to convert it in PDF and save automatically to a particular location. I preferred the old NI forums to find a solution for this. I saw the use of Word Get Activex Reference. My problem is I am not able to find Activex Method for Word Activex. Are any other software changes required to get Activex Method???

-Devashri

find the starting point of wave in a waveform

$
0
0

Hello, my name is Titi. I am a beginner in labview programming. I have a problem when i try to find the value near the wave. I want to know how to find the starting point (they called onset time of waves).   as u see in this figure, there is a red signal. i want to detect the starting point (onset time) of three waves (black, purple and blue cursors). Thank you..  

Connecting color sensor Using I2C?

$
0
0

hey, This might sound stupid, my school wants us to build a robot that would be able to implement the color sensor( datasheet is also attached ), As I pull off the myrio I2C bracket to the block diagram, I am having trouble to identify those input/ output parameters to what's given in the datasheet, like slavery address, byte count, byte read , bytes to write, and I can hardly find any example of this online, more specifically, how should those values given in the datasheet 0x67, 0x34, 0x56 be used in the labview coding? Thanks

 

My Labview Coding: 

Untitled.png

 

 

dfgg.png

 

color sensor datasheet

http://modernroboticsinc.com/Content/Images/uploaded/Sensors/Sensor%20Documentation.pdf

error to visualize my velodyne

$
0
0

HI guys,

I have  a lidar code that read velodyne 16 channels yet when i want to visualize the point cloud its giving me this error.. Please can anyone help??

Thanks

 


How to change the size of comments and make them bold?

$
0
0

Hello to everyone!!, I'm new using labview, I was search for the solution of this problem and I can't encounter some solution :s . The problem is that when I have been sawing the tutorial of labview of NI of state machine, I notice that in the tutorial creating a program using this text for comment it: 

Para labview.png

I try to do some coments like that but I'm  only achieved this:

 

Screenshot_1.png

How I can do the text more bigger and in bold? 

LINX- custom command

$
0
0

I created my custom command for LINX arduino interface.MY doubt is coding using  predefined command like Analog read ,digital read ....needs to upload into ARDUINO.In custom command Code is generated in Arduino IDE and then uploaded into Arduino.My doubt is if i use both custom command and Predefined command in same coding whats the procedure to upload code into arduino?

                                               THANK YOU

NI 9775 dynamic data

$
0
0

I have NI9038 cRIO and NI9775 module. I can read data from my module now but I also want to plot them in a graph like I do in DAQ which requires dynamic data. How can I convert data obtained from module to dynamic data? 

Unable to get Multichannel output in LABVIEW

$
0
0

Hello,

Basically my project is based on Multi-channel Data acquisition system in LABVIEW. My requirement is to get the data of various sensors in LABVIEW through micro-controller (89C51).

 

The micro-controller transmits the data serially which I am supposed to get in LABVIEW.

 

The controller part is ready, it is transmitting data of various sensors(channels) serially in a fixed time period i.e 10 sec for each channel (for this I have used ADC0808).

 

But the main problem is that I am not getting the data of all the channels in LABVIEW, only first channel output is coming in the serial buffer.

At present I have used Array to Spreadsheet Converter to get data of various channels in the serial buffer, but it is not working properly (only showing data of first channel).

 

Please help in this regard whether to use any other Function block and provide valuable suggestions / guidelines.

 

Position and speed reading form two signal?

$
0
0

Hello i need to modify this program to know how to know speed the direction of the two signals ?

 

I have two wave form shifted by 90 degree i need to know the speed and direction.

 

thanks

125873694f.jpg

 

Viewing all 69497 articles
Browse latest View live