Structuring Code For Manual, Record, Play Mode

Hi,
I have 3 Vi's, one for manual operation, one for record and one for playing back the recorded data. They take a 0-5V signal read by a Arduino Uno micro controller.
Manual - this just constantly reads the signal
Record - upon activation this records the signal from the Arduino ad writes the values into a file
Playback - this takes the data written into a file and plays it back.
I am unsure how to structure the code. I want the user to be able to chose between any of the modes, and randomly switch between them (i.e there is no defined sequence). I would also like the common features such as the output chart use the same plot, not use one plot for each mode.
I have attempted to do this using a case structure, however you can only switch between cases if you change the case, then stop the currently active state. Even this does not work for switching between some stated as they do not have a stop button to allow release from the active state to the new one.
I'm sure that there must be a convenient way of doing this, I'm just not sure what it is and am not sure what to be searching for on the forums. I have attached my present attempt. Any advice or example vi's of a similar type would be appreciated.
Eventually the code will be integrated into a system for manually operating a 3 axis table (stepper motors), with the ability to record operations, and play them back. I have the stepper motor control dealt with, I just need to understand how to switch between operation modes. The input will come from joystick and potentiometers measured by a microcontroler to form the input.
I'm using labview 2010.
Solved!
Go to Solution.
Attachments:
Record Data to File Pour_Machine_V1.vi ‏12 KB
Master_Structure_V2.vi ‏100 KB
vi structure.jpg ‏72 KB

Code attached. Hope this helps.
EDIT: I re-attached the Controller VI and added Batch Enable-Disable to make the UI more user friendly.  Why not, you know?
Cheers,
Rory
Attachments:
Batch Enable-Disable.vi ‏15 KB
Controller.vi ‏30 KB
states.ctl ‏5 KB

Similar Messages

  • Unable to create new structure code for System Items flexfield

    Hi
    I installed the R12 with Vision. In the System Items flexfield, I find one structure code "SYSTEM_ITEMS". But I am not able to create new code as I am getting the error. "FRM-41051 - Cannot create new records here ". Also the New icon is disabled.
    Is this how it is supposed to work? Cant we create new structure code for System Items flexfield in Vision Database? Please help me to resolve this.
    Regards
    Reem

    Hi Everyone,
    Lets address your exact problem ::
    I installed the R12 with Vision. In the System Items flexfield, I find one structure code "SYSTEM_ITEMS". But I am not able to create new code as I am getting the error. "FRM-41051 - Cannot create new records here ". Also the New icon is disabled.
    Is this how it is supposed to work? Cant we create new structure code for System Items flexfield in Vision Database? Please help me to resolve this.
    Yes ! The answer is that this is exactly how it is supposed to work.
    In Inventory :: [ System Items KFF ] is supposed to be single structure whereas Item-Categories has Multi-Structure option.
    For every Single Instance :: It is like this only ~ as a standard functionality.
    And this becomes very very challenging ( but a very fruitful & long lasting ) exercise.
    Thrash it with the clients :: Why should you ever have 2-3 different Item codification schemas when its the same enterprise ?
    They might respond with different intelligence incorporated in the Item Codes.
    Most of the Intelligence can be shifted to the Item-Categories as they are not long lasting.
    &&&& This means that either you can push for non-significant part numbering schema or the partial intelligence.
    Keep it small & simple !!
    Ajay Kuma, 510-456-5322

  • Run a code for all records

    Dear all, please tell me how can I perform a code save for all records in ms dynamics crm 2011. (I've changed part of a code and need it work for all old records)

    Andrii thanks for your reply, but it will not work. In this case I work with a N:N connected records. I found this:
    https://rajeevpentyala.wordpress.com/2012/02/05/update-record-using-odata-and-jquery-in-crm-2011/

  • Wanted: Sample source code for voice recorder

    I've been google searching for some sample source code to implement a voice recorder on my AudioVox 5600. I would like to learn how to read from the microphone and write to my SD card in a standard file format like wav, wma or mp3.
    Can anyone help me understand how to do this?
    Thanks,
    Siegfried

    Basic would be ;
    RESULT_FIELDS -xxx = <SOURCE_FIELDS> -xxx
    you have the source fields as source, and result fields for as the target. In between you can check some conditions as in other routines of transformation.
    BEGIN OF tys_SC_1, shows your source fields ( in your case DSO chars and key figures)
    BEGIN OF tys_TG_1, , shows your result fields ( in your case Cube characteristics)
    Hope this helps
    Derya

  • Start routine code for deleting records in different language

    Hello,
    can someone please specify the exact code to be used in start routine, and whre exactly it needs to be pasted?
    this code is needed for master data notifaction type which is loaded for both languages German and English.
    german records are to be avoided.
    thanks,

    Ciao Claudio,
    this issue about languages selection is an old situation...
    The problem is that language selection is not possible, even if you have this field checked for selection !!!
    Look at OSS Note 324684...
    "If a field of a DataSource - typically with field name 'LANGU' or 'SPRAS' - is assigned to InfoObject '0langu', the field is not provided in the selection fields although the field actually can be selected. In this case, all languages of the language vector active in the BW System are requested by the source system but the language selection cannot be defined in the Scheduler.
    A precondition is that the language field of the DataSource in the source system is maintained as selection field. This setting is done in Transaction RSA6 (or RSO2 for customer developments)."
    Bye,
    Roberto

  • Product Code for Manual Uninstall of Elements Organizer 10

    Installed Premiere Elements 10 to migrate application onto new laptop and free up space on original laptop (still in use).  Premiere Elements uninstalled completely but there is still an "Elements 10 Organizer" folder within Program Files which did not uninstall correctly.  Attempting to use Microsoft FixIt to complete the uninstall but this requires the 38 digit product code to delete applications which FixIt cannot locate by name.
    The product code should look like this
    Alternatively, if there are other options to complete the uninstall, advice would be most welcome.
    Thank you for your assistance.

    Remove Photoshop Elements:
    Choose Start > Control Panel > Add Or Remove Programs.
    Select Adobe Photoshop Elements <version>.
    Click Change/Remove.
    Follow the onscreen instructions to remove Photoshop Elements.
    When the installer has finished, navigate in Windows Explorer to C:/Program Files/Adobe/Photoshop Elements (or your custom installation location). 
    Delete any files and folders that remain inside the Photoshop Elements folder.

  • Code for sending records to error stack

    Hi All,
    Requirement: Record satisfying the condition should be sent to error stack and rest should be proceeded further.
    Following is the code written by me to send data to error stack.
    Data gets appended to Monitor but it is not reaching the error stack.
    IF <SOURCE_FIELDS>-FINISHDATE LT wa_cal-VJAHR OR
        <SOURCE_FIELDS>-FINISHDATE GT wa_cal-BJAHR.
          monitor_rec-msgid = 'ZBW'.
          monitor_rec-msgty = 'E'.
          monitor_rec-recno = <SOURCE_FIELDS>-FINISHDATE.
          monitor_rec-skipped = 'X'.
          Append monitor_rec TO MONITOR.
          DELETE TABLE SOURCE_PACKAGE FROM <SOURCE_FIELDS>.
    ENDIF.
    Can you please tell me if the above procedure is fine or needs to be changed?

    Hi Ramesh,
    To me it seems that the code you have written is incorrect. In the 5th line of code you have written:
    monitor_rec-recno = <SOURCE_FIELDS>-FINISHDATE.
    Here you should remember that RECNO & FINISHDATE are of different data types, so may be you can try changing this line of your code to : monitor_rec-recno = <SOURCE_FIELDS>-Record
    U can try this & let me know its working or not, coz i think rest of the code is pretty fine,
    Hope it helps.
    Ragerds,
    Raj

  • Any Sample code for recording+playing streaming live video?

    Hi all,
    I'm new to FMS3,
    I wanna create a page for webcam live recording and playing,
    is there any sample code for reference (i can only found the code
    for live recording but do not have live record+play)?
    Many thanks.
    I have installed FMS3.0 and FME2.0 on my machine, so is it
    capable to do so?
    Many thanks.

    Thanks for your reply, but I have another question:
    My live file (test.flv) is recorded under this path:
    C:\xxxx\FMS3\applications\path\streams\_definst_\
    But seems FMS3 can only play video under this path:
    C:\xxxx\FMS3\applications\vod\media\
    My only success is on this source path rtmp://ip/vod/test in
    the component FLVPlayBack.
    So is it happen to all free version of FMS3 or I have to type
    sth more?
    Many thanks.

  • T code for invoice create

    Hi
    can anybody tell me the T code for invoice create

    Hi Friends,
    You can enter/create invoice with using T-CODE:-
    ZFV60/F-43     Park vendor invoice
    FV60/FB60-    Post vendor invoice
    ZFV70/F-22-    Park customer invoice
    FV70/FB70-    Post customer invoice
    (as authorisation of your SAP ID)
    FV50-   G/L to G/L entry. (Park G/L Document)
    FV65-   VENDOR DEBIT ENTRY (DEBIT NOTE)
    FV75-   CUSTOMER CREDIT ENTRY ( CREDIT NOTE)
    (all above code for manual entry,which not have a Standard format of PO/WO in SAP.)
    MIRO/MIR7-   Park/Post vendor invoice
    MIR4         -   Change miro invoice
    (for Live entry, which having Standard PO/WO in SAP)
    Thanks

  • Change comapny code for master data directly.

    As per the requirement i need to change the company code for some records for company consolidation.
    I need to convert three company codes with one comapny code.
    Is it possible or there is any work arround. answers will be rewarded.

    Probably not the answer you are looking for but SAP has [SLO|http://www.sap.com/services/bysubject/consulting/brochures/index.epx?PageSize=10&ActualPage=4] (System Landscape Optimization) consulting services.  This service is used by SAP customers when they need to change data (master data/transactional data) during say a company consolidation.
    Changing data in SAP tables directly is obviously highly discouraged, especially in a productive system.

  • How To Create ABAP Code For HR Context Sensitive Structural Authorization

    Hello,
    We have created a HR Custom Program which IS NOT built off the PCH or PNP Logical Database. As a result, we need to manually create ABAP code for HR Context Sensitive Structural Authorization Check in our custom HR program. Via HR Context Sensitive Structural Authorizations, we are restricting access to personnel numbers and the underlying HRP* tables.
    Any assistance would be greatly appreciated with the identification of the SAP standard function modules (Ex. RH_STRU_AUTHORITY_CHECK, HR_CHECK_AUTHORITY_INFTY, HR_CHECK_AUTHORITY_INFTY , etc) used in HR Context Sensitive Structural Authorization Check, how they are used to control HR Structural authorization (P_ORGINCON), and some sample code.
    Thank you in advance for all your assistance,
    Ken Bowers

    Hello Ken
    You can use the interface methods IF_EX_HRPAD00AUTH_CHECK to get the same structural authorization as you can see in PA20/PA30. You need to use the methods set_org_assignment and check_authorization for this purpose. For more information you can refer to include FP50PE21 from line 237 onwards till 270.
    Regards
    Ranganath

  • Sample code for a custom field added to LIS Communication structure for Del

    We appended a new custome field into extraction structure of the LO Cookpit datasource 2LIS_02_ITM through RSA6.  And then run CMOD to write the exit code to populate the value and it works fine.  But after we read Roberto's Weblog:
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    Find the enhancement we did can't make the Delta mechanism works if only this new field gets changed in a record, and the change cannot be reflected on BW.  I know we can run SMOD on the enhancement LEINS001 to write the code for LIS Communication structure customer exit.  But we have never writen such a code for LIS Communication Structure enhancement and also don't know on how to make the Delta mechanism works in the code.  We would be very appreciated if some expert here can provide the sample code!
    Thanks

    hi AHP,
    Have you tried Sanyam's code listed in this article you recommended?
    Now our R3 team has added a custom field called ZZZ to EKKO table and I modify the code to suit our need and the code would be as following:
    *& Include ZXM06U16 *
    DATA: i_t_ekko LIKE ekko OCCURS 1 WITH HEADER LINE.
    DATA: ebeln LIKE ekpo-ebeln,
    it_ekko TYPE TABLE OF ekko WITH HEADER LINE,
    old_val(50) TYPE c. "For storing the value from the Field Symbol
    FIELD-SYMBOLS <fs> TYPE ANY TABLE.
    CASE zeitp.
    WHEN 'MA'. "When creating a purchase order
    MOVE '(SAPLEINS)T_EKKO[]' TO old_val.
    ASSIGN (old_val) TO <fs>.
    i_t_ekko[] = <fs>.
    LOOP AT xmcekko.
    ebeln = xmcekko-ebeln.
    IF xmcekko-supkz = '1'. "Old Value ?
    SELECT SINGLE * FROM ekko INTO it_ekko WHERE ebeln = ebeln.
    xmcekko-ZZZ = it_ekko-ZZZ.
    ELSE. "New Value ?
    READ TABLE i_t_ekko WITH KEY ebeln = ebeln.
    xmcekko-ZZZ = i_t_ekko-ZZZ.
    ENDIF.
    MODIFY xmcekko.
    ENDLOOP.
    EndCase.
    The compile of the above code works fine and we activated everywhere including project level. Then we set debug points in this code, and run RSA3 on 2LIS_02_ITM, but find the extraction program never reaches this code or call this user exit function EXIT_SAPLEINS_001 of this enhancement LEINS001. Any reason?
    Thanks
    Kevin
    Message was edited by: Kevin Smith

  • Why is auto recording mode acting like manual recording

    In Cap4 my recording mode is only capturing all screens in one screen even when I have selected auto record mode, anyone have any ideas why?

    Hello,
    Please, could you elaborate some more, I do not understand your question. What do you mean by 'capturing all screens in one screen'? And what did you expect Automatic recording mode to do, that you call it now behaving as Manual?
    In Automatic recording mode, CP decides when to take a snapshot of the screen (because something has changed) and when to switch to Full Motion Recording because the capturing cannot be used with static slides (such as with drag and drop, moving with the mouse). In Manual recording you decide yourself when to take a snapshot (with Printscreen) and to switch to FMR recording.
    My intuition tells me (can be wrong of course ) that you are supposing Automatic recording mode to be like video recording, but in CP that is called Full Motion Recording (use the video camera instead of the still camera in the toolbox of the recording setup). It is not really recommended to use this mode for whole projects, for several reasons: editing is quite a lot more difficult in FMR (and editing possibilities is a very important feature of CP) and of course the filesize will be much larger with FMR than with the 'native' modes like Automatic / Manual recording that are based on static slides.
    Lilybiri

  • SRM 7.0 company code selection for manual PO

    Dear All,
    We use SRM 7.0 and I have created a purchasing group under a central purchasing organization. This purchasing group is responsible from procurement of  two different Company Codes. I did all the assignments in responsibility tab and attributes tab under PPOMA_BBP.
    When i try to create a manual PO, I don't see any option to select the company code, either in "Overview" tab , nor in "Header" tab.
    Does anybody know or help me how to select/enable company code selection for manual PO creation ?
    Thanks in advance,
    Best regards,

    Dear Kumar,
    Thanks for the info. In my organization, there are two company codes and apart from them there is a Purchasing Org.
    All the attribute settings are done for these company codes. While creating a PO, as there is no field for Company code, system determines the company code automatically in background. (let's say Company code X). But I'm trying to create a PO for company code Y.  When I enter the cost center, I got the error "Cannot purchase between company codes".
    So how am i going to select company code Y ? How the system will determine company code Y ? Can you please give in details what must i do ??
    Thanks in advance,
    Best regards,

  • For a trade show exhibit, I'm putting a KN presentation on several iPads for the booth. Is there a way to keep the presentation in "Play" mode?  Thanks!

    For a trade show exhibit, I'm putting a KN presentation on several iPads for the booth. Is there a way to keep the presentation in "Play" mode?  Thanks!

    better to ask this in the discussion that deals with Keynore on iPads; here:
    Keynote for iOS

Maybe you are looking for

  • Windows 2008 Server RC 2(64bit) ,Crystal Reports11.5 Compatbility Resolve?

    Our company is moving to Windows 2008 Server RC2 64bit OS platform to run our reports. Will Crystal Reports 11.5 run on this OS platform? Right now it does not. Is there a resolution?

  • IDVD 5 and various players

    I'm about to burn my cinematic opus to disc using iDVD.. I tried yesterday, and basically succeeded, except that the disc was "unreadable" on our Playstation, which we use to play store-bought movies on DVD. Is there something I can do in prepping th

  • Reversal of invoice on PO

    Can a invoice be reversed on a PO after the GR/IR clearing has been completed and the invoice has been paid? The payment was a valid payment just against the worn PO. When trying to execute MR8M to reverse invoice, getting error " Document already co

  • Calling istance class from other class

    Another step, another problem. I've declared a mySocketDelegate class that contains all the delegate methods of NetSocket and it's the delegate for my extern mySharedSocket. It works without problem, since i've to send a message to another class, in

  • Create Object for .rep in C#

    How to create object for the BO Desktop Intelligence .rep in C#