Data Acquisition problem with multiple length of commands and data received.

Hello,
I need to write a program to communicate with a Data Acquisition board. There are about 10 commads and each has a different number of bytes associated with it. For example command-1 has 4 bytes which need to be send to the DAQ, command 2 has 6 bytes, Command 3 has 4 bytes etc...
When the board responds back to the commands I send, it responds back with different number of bytes for each command. For example, When Command 1 is send to the board, it responds back with 3 bytes of data, whereas when command-2 is send it responds back with 5 bytes of data.
Each data byte received by my labView program from the board, needs to be displayed after some processing has been done. This processing may or may not happen on all the bytes of data got back.
I want the program to be scalable, so that if more commands are added later on, the display and the processing changes in accordance with that.
What will be the best approach for such a system ? I want the system to be dynamic, and dont want to repeat or re-write the code for each case statement ( case statements will be decided by the commands).
Any input is welcome.
Thanks,
birapxi

Hello Dennis,
That is certainly one way of doing it, but it is the brute force method. Is there any way to use clusters and add the data bytes coming in and going out to clusters. Also when the user sends a specific command out, can I use the unbundle by name function to send the bytes corresponding to that command.
For displaying the data received, can I follow a similar approach and use unbundle by name function to just display the specific data bytes for the command i have received.
Thanks for your input,
birapxi

Similar Messages

  • HT5361 Today, I experienced a problem with my mail. the time and date on each email received and sent is 18-06  and the date is 22nd July irrespective of the actual time

    Today, I experienced a problem with my mail. the time and date on each email received and sent is 18.06 and date as 22nd July. Thank you  John

    Incorrect date or time displayed in various applications

  • Data acquisition problem with NI-DAQmx 9205 and SignalExpress

    Hi everyone,
    I am using a NI-DAQmx 9205 connected via ethernet to my computer and Labview SignalExpress running to acquire data. I am working with EMG and I use an amplifier system from GrassTechnologies (http://www.grasstechnologies.com/products/ampsystems/ampsystems.html). The way it works is the electrodes are plugged on the amplifier system and the amplifier is plugged to the NI-DAQmx 9205.
    I don't know how to setup the system to be able to read properly the emg signal on SignalExpress.
    Does anyone know how to use it?
    Thank you for youe help
    John

    Hi John,
    If I were an Applications Engineer I'd probably be able to figure this out on my own but would you mind elaborating on your hardware setup a little? You mention plugging into a "NI-DAQmx 9205", however the NI-DAQmx is the data acquisition 'driver', the [NI]9205 is an Analog Input Voltage module. Do you mean to be plugging into a Compact DAQ or cRIO?
    Also, I'm not familiar with EMG readings or the amplifiers/electrodes you're working with.
    What is the signal type going into the amplifier from the electrodes, and what is the signal type and range (amplitude) of the signal coming out of the amplifier; AC, DC? I'm assume it's all voltage?
    Straight voltages are pretty easy to work with provided you can scale it to usable units.
    Lets get your hardware and signal types figured out then we'll be able to tell Signal Express how to handle those signals.  
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise

  • Yosemite problems with double click dock commands and keyboard shorcuts

    I have a mid 2012 macbook pro 17", i recently installed Yosemite although it fixed my internet problem (connection dropping randomly) now i am having issues with opening apps and files. Double clicking on a file launches the corresponding app but does't open the file i just get and message stating the app is not open anymore if click the file again. Finder keyboard shorcuts such as command+Q don't work. Can't access some menu items such as "about this mac". Dragging a file into the dock icon launches the app but doesn't open the file either.
    I have no idea what's causing this. anybody got a clue or having similar problems
    Thank you

    Same problem here. (Yosemite 10.0.1)
    the mouse is a 'team scorpion g-reaver' http://teamscorpion.net/ts2014/g-reaver_1.html
    It's work perfectly on the pc of my brother (he uses windows).
    It's a clean install...
    And has a funny fact... The Left Button was with this problem... So what I did? I changed the primary mouse button to the Right... Worked ok for almost 1~2 days... After that, the two buttons showed the double-click problem....
    But, I repeat, the mouse works perfectly in the windows of my brother '-'

  • Problem with multiple Toplink/JPA apps in same server

    Anyone have experence of running serveral Toplink/ EJB-3 Web apps in the same server (OC4J, alas)?
    We seem to get a problem with the second app failing to initialise toplink, with an entity not found message. Each app runs OK on it's own.

    Yes, they access the same datasource and most of the tables overlap.
    We're thinking it might help to have common entity classes and put them in a shared library, but I don't know if this is relevant (setting up shared libraries complicates testing and tends to snowball, I reckon we need about 15 jars all told).
    I''ve had some funnies on OC4J before which I think may be to do with it's use of ClassLoaders, for example I initially put persistence.xml in the libary jar with the data model, but for some reason I get the entity not found error that way. It only seems to work if it's in the classes folder.
    For the moment we're getting arround the problem with multiple OC4J instances in the server.

  • Problem with offset length

    Hi,
    i have a problem with offset length please see below code and suggest :
    data: content_new                LIKE soli-line.   "It has a length of 255 charecter
    content_new = 'MTE:SD0\nwssd01_SD0_00\CPU\CPU_Utilization'.
    content_new = content_new+4(251).
    it is giving result:
    content_new = SD0\nwssd01_SD0_00\CPU\CPU_Utiliza  "it is removing last 4 charecter of UTILIZATION also
    while i need :
    content_new = 'SD0\nwssd01_SD0_00\CPU\CPU_Utilization'.
    can anyone plz help me?
    regards.
    Moderator Message: Duplicate Post.
    Edited by: kishan P on Oct 28, 2010 9:44 AM

    You can find string length first. Subtract length by 4,  Then use like new = str+4(len), use condense if required.

  • How to Restrict Single Delivery Date for PO with Multiple Line Items

    Dear Experts,
    How to Restrict Single Delivery Date for PO with Multiple Line Items.
    System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode.
    Can we achive this by Some Enhancement in SAP or Not ???
    If so how to do it.
    Any Inputs is highly appreciated.
    Thanks and Regards,
    Selvakumar. M

    Hi Selvakumar,
    we can resrict the PO to have a single delivery date in all the line items by means of giving a error message or overwiting the delivery date keyed/determined in the line item.
    You can use the BADI -> ME_PROCESS_PO_CUST. In which you need to implement the method PROCESS_SCHEDULE.
    (for technical aid - This method will be called for each and every PO line item, From the imporing parameter im_schedule we can get all the details of current PO line, even we can change the data in the current PO line. )
    Regards,
    Madhu.

  • I have a problem with ALV Grid User Command?

    Hi Experts,
    I have a problem with ALV GRID User Command.
    I am calling TCODE IW33 (Order Display) from the ALV output at first time by selecting an order. But, User command is calling IW33 Initial screen with blank value of order. Even I checked in debugging the value what I selected is passing properly, but once that screen (IW33 Initial) displays, value doesn't appear. Then, Manually, I  created another session and gone to TCODE IW33 and displayed an order. After that I came out from that order. Then again run my ALV program and selected another order, now order is displaying, but not what I selected current order instead of displaying previous order what I just displayed manually. If I selected any other order, system will display the same order what I dislayed manually.
    Here is my code.
    FORM user_command_alv  USING u_ucomm TYPE sy-ucomm
                           us_self_field TYPE slis_selfield.
    CASE u_ucomm.
    WHEN '&IC1'.
    READ TABLE it_final INDEX us_self_field-tabindex INTO wa_final.
            WHEN 'ORDER'.
              IF NOT wa_final-order IS INITIAL.
                SET PARAMETER ID 'COK' FIELD wa_final-order.
                CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.
              ENDIF.
    endform.
    PARAMETER ID 'COK'  also the standard one.
    Could you please help me out, Where I did wrong?
    If I select any order, that order only should display.
    Thanks in advance.
    Regards,
    Sarayu.
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:33 PM

    hi,
    Please check it once the Paramater ID is 'ANR' for IW33 order number.
    Hope this may help.
    Regards,
    Sravanthi

  • Problem with output string to command

    hey i have no idea why this aint working
    its a simple output string to command.
    what it is supposed to do is make a new directory given by the input string
    e.g. mkdir /home/luke/dep
    thanks for the help
    //methods input save files
         saveFile = JOptionPane.showInputDialog("Save Files To : ");
         //method command for saving files
         //Stream to write file
         FileOutputStream fout;          
         try { Process myProcess = Runtime.getRuntime().exec("mkdir" + saveFile );
          InputStreamReader myIStreamReader = new InputStreamReader(myProcess.getInputStream());
          fout = new FileOutputStream ("file.txt");
          while ((ch = myIStreamReader.read()) != -1) { new PrintStream(fout).print((char)ch); } }
              catch (IOException anIOException) { System.out.println(anIOException); }

    What you fail to understand is that "aint working" and "Problem with output string to command" tells us absolutely squat about what your problem is. This is the same as saying to the doctor "I'm sick" and expecting him to cure you. As mentioned by Enceph you need to provide details. Do you get error messages? If so post the entire error and indicate the line of code it occurs on. Do you get incorrect output? Then post what output you get, what output you expect. The more effort you put into your question the more effort others will put in their replies. So until you can manage to execute a little common sense then the only responses you will get will be flames. Now is your tiny little brain able to comprehend that?

  • Data Modeler: Problems with importin from DDL and Designer

    I have a few problems with importing models from Designer and DDL:
    1. Can I import spatial indexes from Designer or DDL file? An index does appear in the model but it doesn’t seem to be a spatial index. When trying to import from database, the index doesn’t appear in the model at all.
    2. Is it possible to import sdo_geometry data types from DDL file? I haven’t succeeded with it, instead the column's data type appears unknown.
    3. Sometimes import from DDL files (that are generated with DM) failed with nothing appearing to the model. I haven’t figured out why that happens. I didn’t receive any error message, the model just opened empty.
    4. DM doesn’t seem to recognize public synonym creation from DDL. View log gives the following message:
    <<<<< Not Recognized >>>>>
    CREATE PUBLIC SYNONYM TABLE1
    FOR TABLE1
    5. Sequences lose their properties when importing from Designer. They only have a name but but start with, increment by and min/max values are empty in DM. Importin from DDL works fine.
    I’m using data modeler version 2.0.0 build 584

    Hi Alex,
    There is newer version of Data Modeler (3.0 EA2) and it is free
    You can download it from here
    http://www.oracle.com/technetwork/developer-tools/datamodeler/ea2-downloads-185792.html
    Regards
    Edited by: Dimitar Slavov on Dec 9, 2010 2:15 AM

  • Problem with multiple versions of documents being published with 001, 002, etc.

    I am using Contribute CS3. I am having a problem with multiple versions of documents being published on the sever with 001, 002, etc in the name. So that I end up with 2 or 3 versions of a document on the server. Does anyone know why / how Contribute  is doing this? Thanks for any help you can give.

    Your Web site administrator will need to update your key to allow you to delete files you are able to edit.

  • Problems with multiple idocs in one file ( Inbound file )

    HI,
    Thanks in Advance for your suggestions.. Highly appreciated.
    We have problems with multiple IDocs in one file.
    We are using XIB ( Amtrix ) as Middleware to receive the files.
    Curretenly When the file contains one IDoc then there is no problem. IDoc is created and everything is ok.
    If file contains two IDocs ( for example two messages ORDERS and DELVERY ) then it is creating two IDocs but both IDocs contains ORDERS plus DELIVERY segements information. That is the problem. Some how SAP unable to differentiate the IDocs in the file.. But it knows that how many idocs are there in the file..because it is creating exact number of idocs.
    We are using TRFC port ... Do I need to change it to File port..
    When we have more than one idoc do we need set any parameter in the file ...

    Thanks for the swift response. Always ideas are useful.
    As of now , Middleware cannot split the file.
    Thing is SAP is creating two Idocs with different message types. Problem is First IDoc contains ORDERS message type but also DELIVERY segments as well. Second IDoc with DELIVERY message tyoe but ORDERS segments as well... This is the problem... I think we are missing some field activation in file for EDIDC record.
    As far as I know file port supports the number of IDocs in one file.. Hope TRFC port also supports that

  • HT201210 I m having problems with both my iphone 3gs and 4 when my cellular data is on and my battery is fully charge but out of suddenn it will shut off can i know how can i troubleshoot this issue thanks

    I m having problems with both my iphone 3gs and 4 when my cellular data is on and my battery is fully charge but out of suddenn it will shut off can i know how can i troubleshoot this issue thanks

    simply try doing a back up and restore
    when going thru the activation screen, select SET UP AS NEW and then test your device. if it is not shutting down then it could be 1 or more apps tht have been downloaded wch could be affecting the device
    you will then need to follow the process of eleimnation, meaning add 2 apps and then monitor your phone, if nothing happes then add another couple of them and then check
    good luck !!

  • Data Roaming Problems with Lumia 610 and 710 phone...

    Data Roaming problem with Lumia Wndows 7.5 phones.  We have a Lumia 710 and also 610 phones on Virgin pay monthly sim cards.  We cannot get data raoming to work on either phone.  We have tried in a number of locations in France and Switzerland. Virgin confirm roaming and data roaming are set up on our account.  
    - I have purchased Data Passes.  
    - Settings>Mobile Network active network shows current operator
    - Data Connection is on,
    - Data roaming option shows "roam",
     - highest connection speed is 3G,
     - network selection is automatic.
     - Flight mode is off.  
     - Account settings are ok because everything works on Wifi.
     - Connection has been full bars showing 3G.  
     - I have tried hard resets of phone, manual network selection, deleted browsing history,
     - phone software reports that it is up to date,
     - I have run Network Setup which confirms phone has been updated network settings for relevant operator.
     - Telephone calls to Virgin from Switzerland could not resolve the problem.  
     - Discussions with Virgin since returning home have not been able to solve the problem.  It seems to be an issue with Lumia phones. 
    Can anyone help please? Nokia - why doesn't this work on your phones?

    I'm like what an OS this phone has. All I can say is that if you own MS stock dump it fast as the OS on this phone is so bad its not even funny.
    I think what they are trying to do here is a last ditch attempt to capture the online services market but it isn't going to work, because they have made this OS to weird.
    I'm a pretty seasoned user and I generally am able to get gadgets to work but dudes this puppy is something else. I have 14 days to exchange it so Im going to give it my best shot for another couple of days and see where it goes.
    The phone itself is pretty decent otherwise I would have returned on the 2nd day. Its pretty fast and the screen is nice and bright and if not some major concerns I wouldn't be a complaining.
    1st} There is no way to import your bookmarks into the phone without using a online service.
    2nd} I haven't been able to successfully export my old contact list from my LG P500 Android.
    The 710 seems to only use contacts that are stored on online services even though I have imported my contacts using the Contact transfer function on the phone.
    3rd)The phone won't shut off while charging even if you shut the phone down , plug it in and it turns on no matter what you do.
    The Zune software is all glitter and no meat too unfortunately.
    I really wanted an alternative and the phone is such good value and a local new Provider has a 27 $ a month unlimited everything, but luckily they have a 14 day phone exchange policy.
    I'm going to keep for a few more days and see if I can get it to work the way i want it to.
    Moderator's notes: Profanity removed, such language is not tolerated on the forums, please read the forum guidelines. 

  • This is just to report a problem with Apple updates. I updated recently and the computer brought up my 2012 desktop with all my 2014 files and data including stickies missing! Now I hesitate to do another Apple update. What would you do?

    Apple Updates: This is just to report a problem. I updated recently and on restart the computer restored up my 2012 desktop with all my 2014 files and data including stickies missing!!! Now I hesitate to do another Apple update. What would you do?

    If all your files are missing
    You may have logged in as a different user, such as Guest. Open the Users & Groups pane in System Preferences. Your name should be at the top of the user list, under Current User. See also this support article.   
    If files are missing from one folder
    Change the Finder view mode; for example, from icon view to list view, or vice versa.
    If files are present, but seem outdated
    You may have started up from a different volume (disk.) Open the Startup Disk preference pane and check the selection.

Maybe you are looking for

  • Additional field in vl10

    I need to add transportation zone and region on vl10 screen. I worked with my developers and got the fields and developed a layout through VOL1, but am still unable to see the field on the VL10 screen. What am i ding wrong? Do I need to use enhanceme

  • Open Access from Labview

    Hi, I open a Access database with the metod Opencurrentdatabase of appliaction.But i had a problem because the database open but after it's closed. What's is the right method for call a database?

  • Double.parseDouble

    the user enters a premium amount and then I want to use that amount in a calcuation; can't I parseDouble it like this? apparently not, because when I try to multiply, I get an error "the operator * is undefined for argument type(s) double, String. I

  • ITunes doesn't play to the correct output device

    Background I have an Acer Aspire 5100 laptop running Vista Home Premium connected to a Xbrand 360 Universal Docking station via USB. Bose Companion 2 Series II speakers are connected to the dock via a 3.5mm miniplug and cable. Problem iTunes output g

  • Profile problems

    Question 1: Before, I logged into terminal Typed: mate profile and a profile document with some comments/paths opened in textmate. Now I log into terminal Type: open .profile and it returns The file /Users/francobarbeite/.profile does not exist. Type