Acquiring data from EMG (data socket?)

Hi!
I have to use the Porti TMSi to acquire an EMG signal, that I want to use to control a vibration motor with vibration frequency proportional to the muscular activation.
My problem is that I don't know how to make the TMSi communicate with Labview and pass it the acquired samples.
The TMSi has a software (PortiLab2) which has a feature called 'Sneezer'. Signal data that is connected to this block will be broadcasted to the LAN. Another operator called 'Snooper' (in the 'Data Sources' section) can be used to sniff the LAN for the signal that is broadcasted by a 'Sneezer'. 
One of my colleagues has implemented a software in Visual Studio in order to acquire data through socket (I attached the files).
I wonder if it is possible to do an operation like this with Labview.
Thank you!!
Attachments:
Header.h ‏2 KB
TMSiConn.cpp ‏3 KB

Hi!
We managed to do the data conversion (parsing the header and convert data in the proper format).
I attach here the VI.
The problem now is the slowness of these operations...we need to control a motor in real time with a signal proportional to the muscular activation but the delay is almost 2 seconds!
We wonder if the problem is the UDP connection or something inside the Labview code (maybe it is not optimal and it takes too many time do the operations required).
The delay is not only in the output of the DAQCard but also in the displaying of the data read from tha LAN port, immediately after the conversion.
Is there something we can do to improve the performance of our code?
Thank you!
Serena
Attachments:
EMGreceiver+DAQ.vi ‏146 KB

Similar Messages

  • Identifying single motor units from EMG data

    I need to identify single motor units from EMG data and have been unable to find anything on the NI web site that could help. I have identified a third party program, Spike 2 from Cambridge Electronic Design (CED), that is able to do the job however I have already go a large investment in NI hardware and software and do not want to have to buy all the CED hardware. I was wondering if anyone knew if it were possible to control the spike 2 program from inside LabVIEW (in close to real time), or if there was a LabVIEW based solution that I have been unable to find.

    Sorry for the confusion.
    This post is regarding template matching/detection of events from a nosy analogue signal. It is a medical application, not a motor/servo application. The term �motor unit� refers to the action potentials found in electrical recordings taken from muscles (EMG). By identifying the occurrence of these events we can determine properties of the nerves controlling these muscles. However identifying these events is very difficult as the recorded signals are noisy and the shapes of these units change over time. Many researchers have attempted to design computer-based solutions to this problem but is has only been with recent improvements in computer power that a solely software based solution for real time pattern matching has been possibl
    e. Although this application is specific to medical research (and electrical recordings of nervous system activity in particular) the number of research laboratories around the world attempting to perform such analysis is large enough that I though a LabVIEW base solution may exist.
    Barring a LabVIEW based solution I was wondering if anyone knew if it were possible for the data to be acquired in LabVIEW then directed to Spike2 (the most common program used for this application) in almost real-time. I know I can record data in LabVIEW and save it as a text file then open it up in Spike2 but I do not know if I can stream the data into Spike2 online. Online processing of the data is necessary to determine the progress of the experiments.

  • Can I send data from a PC to another PC using Data Socket Servers?

    I need to send an array to a computer. Both computers use LabVIEW. The computer that writes the information also runs the Data Socket Server. What I want to do is read that array from another computer via internet. So the main issue is: Can I read from a Data Socket Server via internet?
    I'm writting the array using the dstp where I'm supposed to type the URL.

    Integrating the Internet into Your Measurement System – DataSocket™ Technical Overview
    Found using a simple search.

  • How to acquire data from multiple dataports at the same time

    Hi,
    I studied the multithreading section of Labview, but still have no idea
    how to make it work. Let me briefly explain my situation. I need to
    develop a program that can control and acquire data from 4 serial
    ports. I have 4 buttons to control starting or stopping acquisation
    from the corresponding port. Every acquisation process is a while loop.
    How can I start a new acquisation loop (eg. from COM2) while the loop
    for COM1 is still running? In other words, I wish the 4 loops running
    independently, and are controlled by their corresponding buttons only.
    Thanks for any suggestion.
    Jin

    Hi Anonymous,
          If I were you, I'd create one VI (call it Port.vi) to listen to one port - then make it reentrant.  Drop 4 copies of Port.vi on your Main diagram.  Port.vi inputs could include a VISA reference, a "Start/Stop" notifier and maybe a "Quit" occurance.  Wire to each copy of Port.vi a unique VISA reference and a unique "Start/Stop" [boolean] notifier - let all the copies share the same Quit Occurance.
    In Main, have one event case for each of your stop buttons.  When a button is pressed, send the appropriate Start/Stop notifier!
    ... of course you could accomplish the same thing with four identical loops right in your main diagram, but the more complex the port-handling gets, the easier it will be to manage in one place instead of four.
    Cheers!
    When they give imbeciles handicap-parking, I won't have so far to walk!

  • How to acquire data from 2 chs of the same DAQ card at different sampling rate

    I am using single DAQ card (either 6013 or 6014) in my system i want to acquire data from 2 (or more) channels with following requirements
    1. sampling rate of each channel should be independant of each other (say one is 20 Hz and other is 15 kHz)
    2. data from all the channels should be acquired simultaneously.
    3. coding must be done using DAQmx VIs
    I have tried out following things
    1. I created separate task for each channel: i found out that two tasks can not run simultaneously even though the channels are different
    2. I tried out single task with two channels included in it. and i used 'channels to Read' property to determine from which ch. i want to acquire data: this method works fine if the sampling rates are same. but if i change the sampling rate of one channel it gets reflected in other channels as well.
    can somebody help me out to solve this problem.
    i will appreciate if somebody can post the sample code as my deadline is approaching
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

    Hi Dennis Knutson
    Thanks for your suggestion.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • How can I read realtime data from a data socket using DIAdem

    I am currently routing data from an instrument using LabView 7.1 to a data socket. I was trying to figure out how to access that data in real time in DIAdem through the data socket. Another option would be to use the downloaded LabView/DIAdem VI package, but I haven't figured out how to get that to work either, despite the forums here. I would prefer to access it through the data socket, if possible, as the amount of information being transferred is negligable (a string and a double).
    Thank you,
    Sinan Sutcu

    You have to use one of the ScriptDAC blocks. In your case, as you would like to fetch data from a LabVIEW vi, choose the out of the driver input palette. Inside the configuration dialog you can generate a sample script, which is then copied to the windows clipboard. It contains a lot of function prototypes which will be automatically called later during the measurement.
    Basically, the init functions are called during the start of the measurement - here you should connect to the activeX server, the deinit functions are called when stopping the measurement - disconnect from the server here.
    Then there is the function SFD_Readchannel, which is called once for eych tact and each channel you configured. Here, you should exchange the data with your VI.
    I am attatching an example I wrote to control a LabVIEW vi (doing a counter output operation)- that is why the data exchange works the other way around, but I hope it explains the principle.
    Additionally I am adding documentation about the ScriptDAC driver interface.
    Regards
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany
    Attachments:
    MultiCounterOut.zip ‏995 KB
    Script DAC Driver.zip ‏734 KB

  • Acquiring data from all the analog channels of NI-3202 NODE using a single sensor

    Hi all,
    I would like to know that can i be able to get the data from all the four analog channels of NI-WSN node 3202(analog input node) connecting only single sensor on the analog input and connecting all the remaining analog inputs using wires and also shorting the ground pins corresponding to each analog input pin.
    By configuring the each channels like 0.5 sec delay for every analog channels to acquire data. can we get the sensor data from all the channels by doing this. basically here i am trying to increase the minimum sampling rate of the ni-wsn NODE 3202 which is 1s.
    I this approach is correct or we cannot do this.
    Thanks

    Stefan,
    In terms of differential and RSE, channels 0-8 should default to differential when using test panels.  Differential needs two input channels to function correctly and these channels must be spread apart by 8 channels. (i.e channels 0 and 7 are a differential pair)  Channel 13, on the other hand, will default to rse if chosen as the reading channel because there does not exist another channel that is eight away.  I am not quiet sure if the virtual channels will default channel 5 into being differential but I will check into it.  If it is differential as default then you may run into problems since channel 13 is utilized in both strain gauge reads.   
    "The second question is, if we can also use the "voltage" setting for measuring strain gauges? we did that in the past, using LabView 6.2."
    If you are referring to "voltage" as acquiring a signal with custom voltage with exciation then I would reccomend using example in LabVIEW called Acq Wheatstone Bridge Samples (with Calibration).  This can be found by navigating to LabVIEW's example finder and expanding Hardware Input and Output>>DAQmx>>Analog Measurements>>Strain.
    I have also included some useful links that may provide more insight into the SCC modules as well.  Also, what is the excitation voltage and power that your strain gauges are expecting?
    SCC Tutorial Series: SCC-SG0x
    SCC Example Series: SCC-SG0x
    Using the SCC-SG11 Shunt Calibration Module
    Thanks,
    Gio L.
    Digital Support - Product Manager
    National Instruments

  • Acquire date from agilent dso3104 in avraging mode

    hi
    i am trying to acquire data from agilent dso 3104 x in labview . when i configure my dso in normal mode it is acquiring data but when i configure my dso in avraging mode it is not acquiring data on lab view

    I am running labview code for DSO "Agilent 2000 3000 X series" (downloaded from http://forums.ni.com/ni/attachments/ni/140/47325/1/agilent_2000_3000_x-series.zip). VI examples: "acquire waveform single" / "acquire waveform continuously", but it only acquires in normal mode. whenever i change to average mode manually or through "configure acquisition" VI, i get the same error message: No data for operation on PC as well as oscilloscope and Query unterminated.
    Pl find attached the error message.
    If i run "read current waveform" VI , even then , averaging mode is not being supported.
    I have not changed the default time out values in the default VI's or sub VI's. Pl advise on what values to take for sampling in 5Gsa/sec and averaging mode in 256 samples DSO setup.
    Attachments:
    error.jpg ‏40 KB

  • Acquiring data from instruments and wiring it to a while loop

    Hello,
    I am very new to labVIEW and was thrown into a project.  Essentially what I am trying to accomplish is to acquire data from my four sensors and use that data to compute drag.  In order to compute the drag, an initial guess at what the drag is must be given and then calculations are carried out in a while loop that converges on a solution once the difference between the current drag output and the previous drag estimate falls below a certain percentage.  I am continuously acquiring data so I need some sort of way to incoporate a timer to allow time for the while loop to converge and then output the drag value.  Right now I am generating a signal since I do not have the sensors hooked up and labVIEW will not let me connect the signal generator to the while loop and gives me an error that I have connected two terminals of different types.
    If I could figure out how to wire my DAQ assistants to the while loop I could figure everything else out
    Thank You,
    Ellen

    Hi Ellen,
    I might need a little more information before I can help you. How are you simulating your signals? If you're using the DAQ assistant express VI, are you simulating hardware in MAX? Or are you using the simulate signal express VI?
    Alos, what VIs or functions do you have inside the while loop that you are trying to connect to?
    Perhaps posting a screenshot would be useful. I'm sure we will be able to solve your problem.
    Here is a help page that you might find useful.
    http://zone.ni.com/devzone/cda/tut/p/id/4656
    Joel G
    Applications Engineer
    National Instruments UK & Ireland

  • Exception thrown while trying to acquire data from Profile Data Control

    I created a new WebCenter Portal Application (with JDeveloper 11.1.1.4).
    Then tried to acquire data from Profile Data Control through getProfile().WCUserProfile to create a read-only form with profile data.
    After deploying (to internal WLS) and running I got a popup saying:
    *Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.1.2.v20101104-r8475): org.eclipse.persistence.exceptions.ValidationException Exception*
    Description: Cannot acquire data source [java:comp/env/jdbc/WebCenterDS].
    Internal Exception: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.webcenter.CustomPortalDS' didn't find subcontext 'webcenter'. Resolved 'jdbc'; remaining name 'webcenter/CustomPortalDS']; Link Remaining Name: 'jdbc/webcenter/CustomPortalDS'
    The question is how can I create such a data source to acquire data needed?

    Hi, there's two ways, in both ways you need use the user <PRE>_WEBCENTER that RCU create.
    1 - You can go in your console and create de dataSource, as Yannick sad. You can use your production database if you want get some more real tests, or you can get some develope database and run RCU. You can copy the configuration from you WLS server that are installed webcenter to make this easy.
    2 - In develop mode you can just create a database connection name "WebCenter", just like sad here:
    http://download.oracle.com/docs/cd/E17904_01/webcenter.1111/e10148/jpsdg_people.htm#BABICGCH

  • Acquiring data from DAQ

    Please, I am writing a VI to acquire data from one micrometer (like a quad encoder) and a quad encoder for the position. How can I store data coming from the micrometer ( read by a channel of a multifunction DAQ ) in an array of 5000 positions ( one for each millimeter of movement ) ? Thanks

    First initialize a 5000 element array (Not a Number (NaN) data suggested), then run your acquisition loop and replace the array with the acquired data at index position. This is much more efficient than building the array progressively. Use a feedback node to store the array during execution. Look at the attached vi.
    Note that this works with single data points. If you were recording multiple data at each loop iteration, then you would have to calculate the replace position by multiplying the loop iondex with the data length.
    Hope this helps !
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Fill_array.vi.zip ‏12 KB

  • Acquiring data from daq-pad and saving video at the same time

    I am trying to record data from my daq-pad at 100 samples per second. At the same time I am using a usb interfaced camera to record a video feed. The idea is that when i begin recording data i also begin recording the video feed.
    The way I record the video  feed works fine in its own VI (I need it to record at 30fps and it does this just fine). But when I integrate it with the data record/capture VI the framing rate slows down to only 10 fps. I suspect this is because the VI  gets caught capturing the data from the daq-pad thus slowing down its ability to record the video feed. I was hoping you could give me some help with how to record the data at 100 samples per second and get the VI to capture 30 frames per second. Thanks in advance for anyone who helps out.
    I've attached the VI that has both the data capture and the video capture already integrated.
    Attachments:
    usa_swimming with video21.vi ‏892 KB

    Hi,
    I took a look at your code and the problem is that you have both the data acquistion and the image acquistion in the same loop.  Have you tried using parellel loops?  There is more information about this in the labview tutorials that are available online if you are unsure how to do that.  The problem is that you are doing a lot of things in that loop (acquiring data, doing some analysis, and writing to file), so you can't acquire images very fast because it depends on the speed of the loop iteration.  I hope this helps.
    Have a great day,
    GG

  • How to acquire data from the memory of multimeter

    I am a beginner of Labview. I don't know how to acquire data from the memory of multimeter.
    I read some examples about DAQ, but it seems not similar to my case. I can't use DAQ in my computer, as I don't have DAQ board.
    Could anybody give me some guide? Similar examples would be great.
    Solved!
    Go to Solution.

    Confirm that you have the VISA Run Time Engine on the target machine. If you do not have it installed, you can install the VISA Run Time Engine from ni.com.
    Error -1073807346 Using VISA When Running LabVIEW Executable On Target Computer
    Message Edited by Mathan on 10-12-2009 07:11 AM

  • Acquire data from oscilloscope DPO2024

    I am trying to acquire data from oscilloscope DPO2024 using labview. I am able to do so, but my vi file works only for channel 1. Other than channel 1, it do not work and instead, it changes the setting of oscilloscope as well. Find the vi files attached.
    Any help is much appreciated.
    Solved!
    Go to Solution.
    Attachments:
    data_acquire_oscilloscope1.vi ‏28 KB

    1.  You only need to initialize the scope once.  You not need to branch the VISA Resource wire.  Call the Initialize, Setup Channel 1, and then Setup Channel 2 all chained together.
    2.  Use Build Array to create your array of channels.  The Merge Signals is a completely backwards way to do it.
    3.  You only need to close the instrument once.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • 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

Maybe you are looking for

  • Multiple Macs one library

    I'm not a Aperture user, I'm just trying to figure out which program to use. I tried iPhoto, I've used iView for several years (but don't really like it), I looked at Adobes program, and now I'm playing with Aperture. There is however one thing I hav

  • Two Versions on Same Server

    I was wondering if it's possible to have a STVN 2.1 OrgChart and STVN 2.0 Succession Planning installed on the same server? Has anyone seen this kind of setup before?

  • PHOTOSHOP CC - NOT ABLE TO UPDATE

    Left a reply there, but thinking as it is answered, it will just keep making its way to the second page to be forgotten. http://forums.adobe.com/message/5862227#5862227 Require the much needed information on what files need to be removed to make Phot

  • Setting up user iCloud accounts within Network accounts

    Hey All; New to the server environment and have (I assume) successfully setup a Open Directory (for Network user accounts with network homes) server and I am able to successfully bind to it and login to a Network user account via a client mac. I'm ha

  • Any way to make AI import obey project frame rate?

    HI apologies if this has been asked before but the search facility does not seem to be after effects only focussed. I keep getting caught out by 1080P dimensioned AI files always being imported as 29.97 fps even though my import prefs and Project set