Acquire signals with shaft encoder rt

Dear Forum members,
I have a cRIO and using RT to acquire  pressure, temperature, speed and torque signals. I'm also using  a shaft encoder of which one of its two channels gives 360 pulses per rev ( 1deg per pulse). I want to acquire another 2 pressure signals per every degree say for 2 to 3 revs. The problem I'm facing is, being inexperience in labview RT, that I'm not too sure how it is done. I have tried to search for examples and could not find any or may be I have not search in the right place.
I would be much aprreciated if you could guide me where to look for it. I have attached an image of the main part of the block diagram.
Regards,
Ash
Attachments:
comp.png ‏45 KB

Are you asking about the logic to read the pressure transducer value? The speed you are reading is a calibrated value ( conevrted to Engineering unit - rpm)?
I see the configuration of your timed loop as 1KHz and the dt is 1000 so you are iterating the loop every 1 second, not a right approach. Since you have the RT controller you can go for 1KHz with dt = 1 without any problem. Also do not pass the error wire sequentially it may slow down your execution when you are going at a higher rate.
What is the max speed at which you will run? Any specific requirement of acquiring pressure/degree rotation?
The best solution is the one you find it by yourself

Similar Messages

  • Acquire Signal with NI-SCOPE 5102

    Hello. i'm a beginner in LabView. I have to acquire signal from a NI-Scope 5102 and I have absolutely no idea how to do that in LabView, I instaled the drivers but in my computer I don't have the acquisition boards. I tried to see the examples and I can´t find nothing that can possibly help me. I need a step-by-step explanation of what to do. 

    FilipeV wrote:
    All right I will tell you what I have to do. In college we built a printed circuit board that produces a triangular and square signal. In the second part of the work we have to build a virtual instrument capable of selecting only of both signal or both of them at the same time, display in a graph the selected signal and saving the values in a file. The signals generated in the circuit will be read with a NI-Scope 5102. If you wanted to do this what would you do?
    I will see the examples and try to understand what I should do.
    I only had one lesson of LabView and we didn't do anything like this. We only worked with some waves and learned to control the frequency and other parameters, and to view the waves on a graph. That's why I'm so confused with this.
    I'd cheat.  You haven't been properly trained with the tool.
    Use Signal Express Set up measurement step and data logging.  Configure the OI with a boxes for chanel selection. test it.  Generate LabVIEW code
    The context aware help you'll have in SE will probably teach you a bit about scopes too.
    (I can't believe I just said that but if the profs won't teach the tools that only leaves bad practices to get'r'done) Don't think that your programming that way though
    Jeff

  • Trigger Camera with shaft encoder

    Hi Guys,
    I have an NI 9401 module and a cdaq 9174 chassis. I successfully connected my shaft encoder to the NI 9401 module and I can read the rpm and shaft position using a small labview program I wrote.
    However, I need help outputing a 5 Volt TTL signal from the NI 9401 to trigger my camera. Any help would be greatly appreciated.
    Thanks guys

    Hi Eluan,
    I have saved the community example for LabVIEW 8.6. Let us know if you are able to open it now.
    Bill E. | Applications Engineer | National Instruments
    Attachments:
    Cont Read Dig Chan-Int Clk.vi ‏18 KB
    Write Dig Chan - prog high and low.vi ‏21 KB

  • Read encoder signal with 9201

    Hi
    I have a quite uncommon problem. I need to acquire the encoder signal with a NI-9201 (analogue module).
    Is this even possible? Of course I saw I that I should use a NI-9401 but my chassis is full...
    I already tryed to acquire impulse signals with such a module but they were slower.
    Thanks for any help.
    Yves

    Hi Yves,
    when you acquire data from an encoder, do you mean a quadrature encoder or rotary encoder?
    This encoder generates a binary or digital signal.
    Of course, you can always acquire a digital signal with an analog input module. This isn't recommended and necessary when you can use a pre-built api in the palettes for digital modules.
    When there is no free slot you can think about an expension chassis or a single carrier. This depense on your application.
    How did you acquired the slower signal until now?
    Kind Regards,
    Philipp K. | NI-Germany

  • Acquire a signal with mac osX

    Hello.
    I am a very beginner with LabView. 
    I would like to acquire a signal with a NI-USB 6009. I have LabView 10 on osX 10.8. I already installed the daqmx base driver.
    Could you explain me how to acquire a signal which come from the NI USB 6009 and export it as a list of numbers (the amplitude and the time).
    Thanks!

    Hello matttgic,
    What kind of signal do you want to acquire/generate?
    For exemple, if you want to acquire an analog input, you should use the architecture use in the file "Analog_input attach to this email.
    As Johnsold told you, you can find some code for your device in the "find exemple" section of LabVIEW.
    Hope this help
    Sabri 
    Attachments:
    Analog_input.PNG ‏13 KB

  • Acquire generated signal with this hardware ?

    Hello everyone,
    I didn't really know where to post this, I apologize if it's the wrong place.
    I'm very new to the LabView thing, and I have for project to trigger an injector and so to create a digital signal like this:
    Due to the characteristics of the signal (110V, 10-20A, injection duration: ~20ms), someone recommended me this hardware (sorry if I'm not allowed to post these links):
    - programmable power supply: http://fr.farnell.com/ea-elektro-automatik/ea-ps-9200-25-2u/alimentation-1-voie-200v-25a-prog/dp/2422474
    - USB interface: http://fr.farnell.com/ea-elektro-automatik/usb-interface-ea-if-u1/interface-for-psi-el-usb/dp/1268147?ost=EA-IF-U1
    I'll try to figure out on how I create (on my own for now) the signal with LabView.
    My question is, will I be able to acquire the generated signal with this hardware in LabView, do I need something else ?
    Thanks.
     

    I have designed and built injector drivers. To get a waveform somewhat like the one you showed requires a sophisticated and fast control circuit. I would not call that a digital signal.  It may be controlled by some kind of logic signals, but that is an analog signal.  No programmable power supply I have seen is fast enough to come close.
    The pull-in current does not typically go into a ring/overshoot flat-topped waveform as you have shown. It follows an exponential curve defined by the L/R rise time and the current limit set by the supply voltage and the injector coil resistance. For the injectors I have seen that current limit is much higher than the current required to generate the magnetic field required to open the valve.  That oscillatory response could be the result of a switch-mode current regulator.
    Similarly, the hold-in current does not occur by magic. Either the supply voltage needs to be changed (open loop system) or the current sensed and regulated (closed loop system).  The kind of ringing you show can occur in a switch-mode current regulator.
    Lynn

  • Write signal with time stamp

    hii...
    I've a student project to read and write data from a continous signal with labVIEW.. I'm going to read the system for 24/7, The reading program already finished.
    The problem is in the writing procces.. I have no idea how to write data to file with low level vi.. I'm new in LabVIEW and I already try some modification to my program but it still don't work as i want.
     I want the writing procces only occur when i press the button and it only run for a few second with constant time stamp.. It just to check if there are any data missing or not.. The system are a fast (It's what make problem bigger).
    I'm getting crazy at all.. If some one could help me i will be very grateful... I'm using LabVIEW 8.5 and PCI 6259...
    Kind Regards,
    Dani
    -Keep Learning-
    Attachments:
    Read Circle Encoder.gif ‏22 KB

    Hi Dani,
    here's the two-loop version...
    When you use the local you wouldn't need the queue at all... But using locals may lead to race conditions (not in your simple vi, but general) - locals don't provide "atomic" data access.
    In Labview the wire is equivalent to variables in text programming languages!
    The vi uses the producer-consumer-scheme (Erzeuger-Verbraucher-Struktur ?): one loop is producing values, the other is consuming them. It's a common scheme in LV programming, you will find examples and a lot of threads here in the forum.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    circle.vi ‏48 KB

  • Using two daqmx create channel to acquire signals in random

    Hi
    I am trying to acquire signals from PXI 4472 with two DAQmx create channels. The channel selection is random. For eg. first create channel i have ch. 0, 2, 4, and 6 and the other create channel is Ch. 1,3,5 and 7. This I can do, but the problem is that I need to write the acquired data in seperate files for each channels and that too in sequential order. How can I do that. I know i need to use the loop but how will I will select the channels from two different task.
    Thanx in advance
    Nitin

    Ok, here was my idea, I am not sure if it will work for you or not after looking at your VI. 
    You can use some of your subVIS that you made to make the path different for each file.  But what I had in mind for the channels was what I did in the vi i attached.  You can just repeat the process for each of the channels and you would know that they were saved correctly.  You could also feed in the iteration number of the main VI while loop to have the binary files change sequentially (ie, data1, data2, etc).
    Again, this may not be a route you want to take, you may have other ideas. 
    Ill try to work on it some more later, but I have to get back to work for now
    Kenny
    Kenny
    Attachments:
    pxi subvi idea.vi ‏31 KB

  • Better estimation of phase difference between two signals with variable frequency!

    Hello LabView Gurus, 
    Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
    We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
    At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
    My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles. 
    As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
    Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz  and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
    I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
    You can observe that the estimation error increases after you push the button. 
    All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
    I am using LabView 2009 for this task.
    The application is for electric machines and the stability/performance of machines under different faults.
    Thank you for reading this far!
    Regards,
    Awais
    Attachments:
    v603.png ‏320 KB
    v603.vi ‏186 KB

    Jeff Bohrer wrote:
    Basic math gives me a bit of pause on this approach.  You are sampling at 50 times the frequency of interest so you get 50 samples per cycle.  your phase resolution is 1/50th cycle or 7.2 degrees +/- noise.  You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
    Jeff- (Hardly Working)
    I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency.  Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
    F. Schubert wrote:
    I'm not a signal processing expert, but here my basic understanding.
    If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
    The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
    My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
    The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
    To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
    For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
    I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
    Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned.

  • Count edges of AI signal with NI 9221

    Hi,
    I'm trying to count edges of an AI signal that are acquired with an NI-9221 on a cDAQ. The average frequency is about 1kHz.
    I'm acquiring the signal with 10kHz but don't get the right amount of edges. 
    Is
    there any solution for this problem. I know, of course it would be
    easier to use a CTR-modul but my signals doesn't fit with the specs.
    Thanks for any help
    Yves

    Yes, I know. I wanted it to be posted in the Labview forum and hadn't realized my mistake.
    But I still don't have any solution....
    Yves

  • Want to get velocity with quadrature encoder

    I can count and measure the displacement from the encoder signal with your quadrature encoder example file.
    But, can you please advise me know how to implement to get velocity or RPM from that somewhat easily?
    Thank you for your help.

    Hey Encoder,
    You can measure velocity by using a buffered, counting operation. With a buffered operation, the count is latched on the rising/falling edge of the gating signal. Therefore, if you provide a signal to the gate with a known frequency, you will be able to mathmatically determine the frequency of the signal connected to the source.
    You can usually use another counter to provide a gating signal with a known frequency. There are example programs that illustrate how to do this.
    DAQ-STC: Measuring the Frequency of a TTL Signal (Easy-Level VIs)
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DD4756A4E034080020E74861&p_node=DZ52329&p_source=External
    Measure a TTL frequency with DAQ-STC or NI-TIO in Visual Basic
    http://si
    ne.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3D7A756A4E034080020E74861&p_node=DZ52329&p_source=External
    I hope this helps.
    Regards,
    Todd D.
    NI Applications Engineer

  • Can I acquire data with VB from my DAQCard without using Measurment Studio?

    I have the Measurement and Automation Software on my computer and VisualBasic.NET. Do I need any other software if I am receiving 2 analog signals and outputing 1 analog signal on my NI DAQCard-6024E PCMCIA?

    The short answer is yes, you can acquire data with VB.NET from your DAQCard without using Measurement Studio.
    There are a variety of ways to do it. All of them require that you install either the Traditional DAQ driver or the DAQmx driver in addition to Measurement and Automation Explorer. The DAQ drivers are included on a CD or CDs with your hardware. They are also available on the quarterly National Instruments Device Driver CD.
    1) You can use the Measurement Studio DAQmx .NET API. This is far and away the easiest API to use to program DAQ cards in VB.NET and C#. This API is included in the DAQ installer and does not require you to purchase Measurement Studio. However, without Measurement Studio you do not get the benefit of the DAQ Assistant integrated into Visual Studio .NET. The DAQ Assistant, when integrated into Visual Studio .NET, allows you to graphically configure your DAQ tasks, generates the code you need to configure your tasks, and generates a .NET user control (with user interface) that demonstrates how you use the tasks that you created. The caveat to this approach is that PCMCIA cards are not directly supported under DAQmx 7.0. There is, however, a beta versin of DAQmx PCMCIA support as described in this KB article.
    2) You can use the .NET P/Invoke services to call the Traditional DAQ or DAQmx C API directly. See MSDN for more information about P/Invoke. If you choose the DAQmx API, you will need to install the beta of the PCMCIA support as described in this KB article. National Instruments does not provide any examples, language-specific documentation, or code generation for this method. You'll need to look at the C API documentation to see what to do.
    3) You can use the Measurement Studio Traditional DAQ ActiveX controls. These are included in the DAQ installer and do not require you to purchase Measurement Studio.
    The absolute quickest and easiest way to get started using an NI-DAQ card in VB.NET is through the DAQ Assistant and Measurement Studio Professional or Enterprise edition.
    Your next best approach is to use the native .NET DAQmx API. This API was designed from the ground up to support .NET languages. There are examples written in VB.NET to help you get started.
    If for some reason, you don't want to use the native .NET API (or your hardware is not supported under DAQmx), whether you use P/Invoke or the ActiveX controls is a toss-up. It depends mostly on whether you are already familiar with the C API or the ActiveX API.
    David Rohacek
    National Instruments

  • How can I acquire signal from the 2 counters on my 6034e board?

    I want to record one analog signal and one counter/timer signal with Diadem 8. I have a 6034e board. AI is not a problem, but when I define a counter in Diadem, for one of the two counters of the board, I get no or strange readings.

    In MAX, I can only test one feature: pulse counts. So I connect a TTL signal between the source and the digital ground, and it counts a random number, of around 20-30 pulses, for each trigger. Same in Diadem. When I try period measurement (connected at the gate) or others with Diadem, I don't get anything.
    I believe my wiring is correct as I'm used to counters with the PC-TIO-10 c/t board.

  • Media Encoder CS6 with Media Encoder CC

    Hi,
    I have finally gotten Media Encoder CC installed. I still have Media Encoder CS6 on my computer. Can I uninstall Media Encoder CS6 without having problems with Media Encoder CC or any other CC apps? There is no uninstall optiion for ME CS6.
    Thanks

    Uninstalling Media Encoder CS6 shouldn't cause any problem to any CC apps, including Media Encoder CC.
    There is no stand-alone uninstaller for Media Encoder CS6.  In order to uninstall it, you need to uninstall all CS6 apps on which Media Encoder CS6 is depending.  Those CS6 apps includes, Premiere Pro, After Effects, Flash, Prelude, SpeedGrade, and InDesign.  Media Encoder CS6 is installed as a part of those apps.  If you have any of those CS6 apps, please uninstall all of them.  This also uninstalls Media Encoder CS6.

  • Problem with file.encoding in Linux

    Hello,
    I am currently migrating a java project from Windows to Linux. The project is finally shaping up now, except for some encoding problems.
    All configuration files are saved in ISO-8859-1/Cp1252 format. When reading and displaying these files in Swing (e.g. JTextArea), the special characters ���� are displayed wrong. I have tried to start the VM with -Dfile.encoding=ISO-8859-1 and -Dfile.encoding=Cp1252 without success (this is done in Eclipse under Linux).
    I then tried the opposite. I created some UTF-8 files, started the application under Windows/Eclipse, read the files and displayed them in a JTextArea. Garbage characters were shown instead of ���� (as expected). I then used -Dfile.encoding=UTF-8, and voila, all characters were displayed correctly.
    Why does not -Dfile.encoding work for ISO-8859-1/Linux but -Dfile.encoding work for UTF-8/Windows? Anyone here know?
    The JRE I have been using is 1.4.2_06.
    The Linux is a SuSE 10.0

    Continue the "discussion" here:
    http://forum.java.sun.com/thread.jspa?threadID=737153

Maybe you are looking for

  • FSCM-COL Business Partner Creation for Existing Customers

    Experts- After using MDS_LOAD_COCKPIT to create the initial load of Business Partners, there are a few Customers which are still missing Business Partners. Automatic Creation of Business Partners is set up and fully functioning for any new Customers

  • Search appointment by ICal in EWS Managed

    Hi all, First of all, i have tried with the solution of henning however it dont seems to be the correct one... (http://www.infinitec.de/post/2009/04/13/Searching-a-meeting-with-a-specific-UID-using-Exchange-Web-Services-2007.aspx) We have in our appl

  • How can I customize a recurring appointment, e.g., every second Saturday?

    Using the ipad or iPhone, I have not been able to create a customized the recurring period for an event.  I have had to go to my outlook calendar on the pc then resync with the iPad.  Any suggestions?

  • Installing windows with 2 3TB Seagate drives in raid 0

    Hi there, I have a MSI 990FXA-GD80 motherboard that I just recently purchased. As part of my upgrade I also got 2 Seagate 3TB drives to put into Raid 0 to function as my boot drive. I'm unable to figure out how to get windows installed. I Setup the r

  • Sudo pacman behind a proxy...

    I've installed arch on a pc which is behind a proxy. No problem after using export http_proxy=... the point is that if I enter the system as root (or su) I can use pacman but, if I give a sudo pacman (as a user) I can not access the network. Sudo wor