Quantcast
Viewing all 69083 articles
Browse latest View live

Counting with digital input reading Ardunio digital pin

Hi guys,

 

So what i'm trying to do is to count a digital input from an arduino,

When the pin is given a high input the loop should increment once, and should continue to increment as long as the pin is written low and then high again.

Basically it will serve to count digital inputs read from an encoder into the arduino input pin, and should increment (only once) each time the digital pulse is sent

 

Any advice incrementing with a digital input, ive been trying the whole day but cannot get it to work

The VI Image may be NSFW.
Clik here to view.
Untitled.png
Any help will be greatly appreciated


Performing a database call

Upfront I apologize for my lack on knowledge about databases and the database connectivity toolkit.  I am struggling through it with my IT team and making forward slow progress.  

 

We are finally able to connect to an Oracle(11g) database with the database connectivity toolkit (LV2015) and I have successfully read some data using the select VI.  I am pretty impressed with how this works and like the integration this will provide for my project.  The problem is that my IT team is very nervous about a 3rd party application reading and writing to their database tables.  Their concern is for corrupting data, expecially when writing.  

 

They would rather me perform a call to the database using APIs.  To begin, they gave me a test script that would send an email once received by the database.  The script is the following:

    sy_common.send_mail('dgeitz@seatsinc.com'

                       ,'Pvanzyl@----------.COM'

                       ,'Database connection worked'

                       ,'You have successfully called a database procedure from LabView.'

                       ,'d------z@---------.com'

                       ,null

                       ,'text/html');

 

Is it possible to run such a script with any of the database connectivity toolkit VIs?  

 

If this works, the next step would be to have several calls that would read and write data using APIs to make the equipment communicate with the database as needed.

 

 

Need help with dma fifo in fpga, sensor initialization and some more stuff

Hi Folks,

 

The scenario is, I have a sbRIO 9651 and a MPU 6050 (A IMU sensor). I would like to acquire sensor data in FPGA VI, stream it to RT VI for processing and analysis and view it from windows based VI. I came across certain problems which I wasn't able to figure out. I dont have the appropriate cable to interface the sensor yet, which I have ordered, to test the VI.

 

1. FPGA VI:  The I2C Master VI outputs a array of 14 bytes raw data (6 bytes for Accelerometer, 6 bytes for gyroscope and 2 bytes for temperature). since the data can only be written element by element in a DMA FIFO, how can I stream an array to RT VI. I did an auto-indexed for loop to write data and I dont know if this will work.

 

2. RT VI: Initialization of MPU6050 is done here. It involves writing a byte array sequence to I2C Master VI to configure it and then a write-read(writing a register to read data from) process to acquire data. I am not sure how to do the write- read part.

 

3.  The single process shared variable 'RT Stop' used for communication between loops in RT VI is written a value after the loop ends which I dont know as to why. The architecture is based on the Turbine example from cRIO developers guide.

 

I am attaching the VIs for your reference. Please have a look into the code and let me know if you find anything that needs correction. I am totally new to Real time and FPGA programming.

 

Thanks a ton

Gokul

Running VI on Myrio using labview 2016

Hey guys so I’m having trouble creating a myrio project. The first thing I try and do is create a new project and then click myrio from the templates. But as you can see from the below picture I don’t get the option of naming or configure the device like the picture below that.

 

Image may be NSFW.
Clik here to view.

 Image may be NSFW.
Clik here to view.
Screenshot 2016-08-08 15.55.45.png

 

What suppose to happen when I click next after trying to create a “myrio project”

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-08 15.55.53.png

 

Image may be NSFW.
Clik here to view.

 

The only way I can create a VI on the myrio is by selecting blank project and from there right clicking on the project tab and then select “new>>devices and targets” as in the picture below.

 

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-08 16.05.43.png

 

Image may be NSFW.
Clik here to view.

 

After that I can select which way to use the myrio as in the below picture.

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-08 16.05.57.png

 

Image may be NSFW.
Clik here to view.

 

After that I can finally build a VI on the myrio and access the myrio toolkit see below, but when I try to click on a vi I get this error.

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-08 15.57.44.png

 

Also when i try and ping the myrio i cant recieve anything i configured wifi connection but nothing and when i enter the ip address of the myrio into the web it doesnt connect. see below.

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-09 00.31.13.png

 

WIFI configuration

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-09 00.23.35.png

 

 

Software Details

Image may be NSFW.
Clik here to view.
Screenshot 2016-08-09 00.24.47.png
Image may be NSFW.
Clik here to view.

 

 

 

Labview 2016 Navigation windows bug

Hi!

 

When I drag controls in front panel and I have opened Navigation window the navigation window positioning windows does not move with my cursor. It moves only when I release controls. This behaviour is diffrent than previous version. Is this a bug?

 

I am new to Labview. Can someone explain to me if it is save to move to new version of Labview when NI releases it or is it general knowledge that new versions of Labview are full of bugs. I mean you just cant accidentially release a bug where stuff were already working before. Does NI actually have a test team before they release new version of Labview?

error message when we attempt to compile an FPGA program for the cRIO

Hello,

I getting the following error messages.......sofware is the latest 2015 version of labview:

Can anyone help:

 

 

I2C communications using FTDI MPSSE Cable and TE Pressure Sensor

I have an FTDI MPSSE cable and a TE Pressure Sensor

 

FTDI provide LabVIEW drivers for the FTDI but I have been unable to detect a response.  My setup is as shown below.

 

Image may be NSFW.
Clik here to view.
i2c.png

I am using a 3.3 V FTDI with the 5V TE pressure sensor.  FTDI have stated this should be fine.

 

According to the TE specification:

 

The I2C address consists of a 7-digit binary value. The factory setting for the I2C slave address is 0x28, 0x36 or 0x46 depending on the interface type selected from the ordering information. The address is always followed by a write bit (0) or read bit (1).The default hexadecimal I2C header for read access to the sensor is therefore 0x51, 0x6D, 0x8D respectively, based on the ordering information.

 

I could not get the FTDI driver running so tried Benoit's driver: https://lavag.org/files/file/282-mpssedll-labview-driver/

 

However, there is still no response from the MS4525DO.

 

When sending 0x51 (1010001) with the stop bit enabled, the following appears on the scope.

 

Image may be NSFW.
Clik here to view.
Send 51 with start.png

 

But no response.

 

When sending 0x28, the following appears on the scope but again no reply:

 

Image may be NSFW.
Clik here to view.
Send 28 with start bit.png

 

zooming in...

 

Image may be NSFW.
Clik here to view.
Send 28 with start bit zoom.png

 

I don't understand the leading pulse when sending 0x28.

 

Anyway, my problem is that no matter what I do, I get ther error

 

libMPSSE.lvlib:Error Converter (ErrCode or Status).vi<ERR>
FT_DEVICE_NOT_FOUND


<b>Complete call chain:</b>
libMPSSE.lvlib:Error Converter (ErrCode or Status).vi
libMPSSE.lvlib:I2C Device Write.vi
test.vi

 

Does anyone know what I am doing wrong?

network shared global variables between several RT targets

Hello,

I look for info regarding network shared variables for RT intercommunication.

 

Scenario: one "master" PXI and several "slave" PXIs running RT VIs. Data is available in a form of a type definied cluster on each slave PXIs (inside a non-deterministic while loop). I imagine I create network shared global variables for each PXI slaves. One variable for each slave. I only write data to these variables at a single place (in the above mentioned while loops), on the slave PXIs. I need to read this data in a lossy way (i only need the most recent value, like tags) from the master PXI.

Question: should I just use the default "network shared variable" settings? I mean, I do not enable the RT FIFO option (single element), because I think for a cluster it is a no go in case of RT (variable length)?

 

What do you think? Or would you have better idea how to share data between slave and master RT targets (I do not need deterministic/losless data transmission, only recent values)?


Anyone used Canberra CSP library in LabVIEW ?

Have trouble to use CSP library in both .net interface and c++ interface.

 

Image thresholding problem

Hi,

 

I'm working on a complex image processing labview program, and i'm stacked.

I'm trying to build a new program structure where all the data, inculding the camera images, goes through a shared cluster among the VI-s.

In the pictures below you can see as the processing vi gets the data through the Camera.Image In from another VI, where snaps are taken.

In this VI I'm trying to do a picture analizer algorithm, which used to work earlier, before using this particular architecture. There I didn't use a new reference for every image processing step, but here I can not do it any other way.

Until the BCGLookup VI the program goes without any problem, the displayed pictures in the front panel also seem to be okay. After adding another VI, the IMAQ Threshold VI I can not recieve any useful image anymore, no matter what kind of reference I'm trying to use.

The question is how can I make the Threshold block work?

 

Thanks in advance.

Cheers,

Ricsi

Multiple VISA Writes to Arduino SLOW communication

Hi all, 

Firstly, about this project: it's my senior project (EET) and I've been working on this for about 2.5 months trying to get ahead for my last semester this Fall.  The concept is to run an ignition coil using LABVIEW as an interface that A) has user input that is sent to an Arduino MEGA 2560, B) sets up a Tektronix O'scope and sends a current reading to Arduino (the Arduino is also pulsing the coil) while graphing on the LABVIEW UI as well. I also have the Arduino controlling relays, monitoring battery voltage, controlling pulse, etc.

 

This original program works and it does everything I want it to, though I have to wait 1100ms before each VISA write for the Arduino to receive the variables correctly.  Doing this many delays makes the program take about 10 seconds to complete and I needed it ~5 for a full run.

 

This past week I've been experimenting, initially I had each VISA Write in it's own stacked sequence but now I've been trying to put each VISA Write in it's own while loop all in the same stacked sequence with the VISA resource lines controlling the sequence. This basically does the same and works with 1100ms in the loop with VISA Write or if I highlight execution with no delay.  I can't find anything on multiple consecutive VISA Writes on the web that is close to what I am doing. If anyone can give me direction I'd appreciate it.  

 

Note: These most recent programs I am posting are about half of the total program as these are the parts I'm having issues with.

 

Thanks in advance!

pid loop in fpga vi output is always zero

Hello, I have 2 pid loops to control a 3 stage servovalve, the scheme of the control for this devices is that you conect 2 pid loops, the output of the first pid loop is the setpoint for the second one, the process variable for the first pid loop is the position of the valve, and the process variable for the second loop is the position of a spool, so when you want to move the valve, the first pid loop tells the second pid loop to move the spool so the whole servovalve moves to the desired position. I already did it with a code, which I modified to work with 3 of these devices, but right now the output of the first pid loop is always zero it doesn't matter if I change the gains or do something else, I already checked the code several times and  the wirings and everything seems fine, I will attach the code to see if someone can help me with that

Network Streams (NS) - crash scenario at passive endpoint

Hello,

I am going to test this behaviour soon, but I am curious and might get answer here faster.

Imagine two PXI systems. On my "master" PXI I create a NS Writer Endpoint and specify the other PXI's URL (so this will be the active endpoint). In the "slave" PXI, I create the NS Reader Endpoint, and only specify a name for this, no URL (passive endpoint). A white paper describes what happens in case of crash of an active endpoint (passive endpoint will hang forever): http://www.ni.com/white-paper/12267/en/ (see under section: "Connection Management and Reconnections"). This scenario is not a problem for me, I consider the master PXI always running, if crashes, we have another protocol which will deal with this case.

 

However, I am curious what happens when the "slave" PXI crashes with the passive endpoint? I manually restart the slave PXI so the "Create NS Reader" VI executes first, then next the "Read Single Element from Stream" VI should start to operate. Will the stream recover from such crash by only restarting the slave PXI, or do I need to restart the master PXI too?

DAQmx Task Names - VI Issues

I am attempting to use NI's example VI to get the DAQmx task names out in order to send them off into TestStand, however I am having some issues getting my VI to work. I modifed the example a bit to fit the number of ports required, however I cannot seem to get my DAQmx tasks to read out properly. Any ideas?

Is there a way using the format specifiers for a numeric control to pad an exponent value with leading 0's

Image may be NSFW.
Clik here to view.
Smiley Embarassed

I'm embarrassed to admit this... Considering how long I've used LV, I've never really had a good grasp of the format specifiers.  I usually just beat my head against the wall until I get what I want.  My forehead can take no more today, as it is still tender after last night's unrelated head banging.  I need to move on.

 

Is there a way to format the display of a numeric control like this 7.12E+07 (as opposed to 7.12E+7).

 

I'd rather not use a string control.

 

 

 


ESP301 control with Labview/ running 2 labview programs simultaneously

Hi All,

I am using 2 separate labview programs to:

1) move a motor back and forth from 3mm to -3mm at 0.3mm/s continuosly

2) collect spectra, save to a file, move another motor a set distance after several spectra are collected.

The vi's work perfectly when they are run separately but when i try to run them at the same time, the first vi (1), stops randomly at max position before resuming motion. I need it to move continuosly for my experiment t work. I assumed it was because both motor are controlled by the same ESP301 controller which is causing some lag as both vi communicate with the controller. Is there a way to ensure these do not interfere with each other?

- vi (1) is attached

Thank you for your time.

Find array in 2D array

When on Line 0 appears 0 (we detecting indexes) then on line 3 we must subset array starting with every index (length of indexed array = 32). In VI if we increase # repeats, time of execution VI is increasing too. For example, if # repeats=5, time of execution is too low. But if # repeats=40, time of execution is very very high. How this VI can be optimized (decreasing time of execution VI, especially when # repeats>20)?

error at easy excel text in stand alone

Hi all,

 

Receiving error -2146827284 at easy excel text in stand alone app.  This application works fine in the development environment just fine, but not in executable.  I have included the class and library in my build.  One difference is target computer is running MS office 2013 and development 2010.  Any suggestions? Image of error attached.

Mounting of accelerometer to measure acceleration

Hi guys,

 

I am trying to mount somehow an accelerometer on a bullet (diameter = 100 mm) to avoid any vibrations.

 

The bullet is made of high tensile steel and it will experience rigid body motion.

 

I was thinking of cutting the middle of the bullet, mount the accelerometer and then cut a circle to pass the wire on the amplifier. The magnet will be bolted on the top to be able to be lifted in a predetermined height. Will the magnet produce any vibrations because it is bolted? Or is there any other configuration that I could go with?

Thanks.

 

Image may be NSFW.
Clik here to view.
Untitled.png

 

Color menu generated from serial strings

Hello all, I opened a serial connection to a comexpress module that was in the bios using Putty.  The Putty window shows a color menu that looks almost the same as the one on an HDMI monitor.  When I read the data using serial read VI's I get stuff that looks like this:

[0m[34m[47m[05;02H   [1m[37m[47m[05;05HSystem Date[0m[30m[47m[05;31H07[05;30H/[0m[34m[47m[05;02H   [1m[37m[47m[05;05HSystem Date[0m[30m[47m[05;34H2015[05;33H/[05;38H][0m[34m[47m[05;39H               [0m[30m[47m[0m[34m[47m[06;02H   [06;05HSystem Time[06;16H           [0m[30m[47m[06;28H03[06;27H[[0m[34m[47m[06;02H   [06;05HSystem Time[0m[30m[47m[06;31H27[06;30H:[0m[34m[47m[06;02H   [06;05HSystem Time[0m[30m[47m[06;34H46[06;33H:[06;36H][0m[34m[47m[06;37H                 [0m[30m[47m[0m[34m[47m[05;02H   [1m[37m[47m[05;05HSystem Date[0m[30m[47m[05;31H07[05;30H/[0m[34m[47m[05;02H   [1m[37m[47m[05;05HSystem Date[0m[30m[47m[05;34H2015[05;33H/[05;38H][0m[34m[47m[05;39H               [0m[30m[47m[0m[34m[47m[06;02H   [06;05HSystem Time[06;16H           [0m[30m[47m[06;28H03[06;27H[[0m[34m[47m[06;02H   [06;05HSystem Time[0m[30m[47m[06;31H27[06;30H:[0m[34m[47m[06;02H   [06;05HSystem Time[0m[30m[47m[06;34H47[06;33H:[06;36H][0m[34m[47m[06;37H                 [0m[30m[47m[0m[34m[47m[05;02H   [1m[37m[47m[05;05HSystem Date[0m[30m[47m[05;31H07[05;30H/[0m[34m[47m[05;02H   [1m[37m[47m[05;05HSystem Date[0m[30m[47m[05;34H2015[05;33H/[05;38H][0m[34m[47m[05;39H               [0m[30m[47m[0m[34m[47m[06;02H   [06;05HSystem Time[06;16H           [0m[30m[47m[06;28H03[06;27H[[0m[34m[47m[06;02H   [06;05HSystem Time[0m[30m[47m[06;31H27[06;30H:[0m[34m[47m[06;02H   [06;05HSystem Time[0m[30m[47m[06;34H48[06;33H:[06;36H][0m[34m[47m[06;37H                 [0m[30m[47m

 

I can't find anything saying how to interprete this stuff so I could try and display it the same way.  Anyone know what this is and/or what the syntax is?

Viewing all 69083 articles
Browse latest View live


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