How do I trigger on a status byte?

Hello

As a beginner c#, I work on grabbing a ripple out of

My oscilloscope Agilent using c# .NET and Measurement Studio.

So far, it works fine.  Now I want to move to the stage of a project

In addition, then take the waveform only when the scope has been

triggered.  (For now I'm will trigger the field manually,)

then finally I will use an external trigger pulse.)

Up to now I understood how to attract a status byte out of the

scope, the CSJ, which becomes positive after the scope triggers.

I would use this status byte to indicate to my c# program when

Take the wave form and do calculations on it.

If someone could give me an indication as to which would be the first step

It would be great.

Thank you!

Penny,

I modified the SimpleReadWrite sample that comes with Measurement Studio to give an example of how this could be done.  Review the code for MainForm see what I did.  The new method is called TrigButton_Click.  You will need to change it before it will work with your instrument.

This example performs several tasks on the click of the control TrigButton

1 reads the status byte using the ReadStatusByte method

2. checks the status byte with a value of '0' and conditionally step 3.

3 triggers a voltage read my the Instrument Simulator and the poster in the readTextBox TextBox control

These steps can more easily use the imported instrument of ni.com/idnet driver.  I would like to you can always check using that.

Tags: NI Software

Similar Questions

  • How to Set Digital i/o status of Watlow EZ - Zone RM on 'ON' in LabVIEW?

    I have an EZ - box RM Watlow controller and here is the driver:

    http://www.Watlow.com/downloads/en/software/Watlow%20EZ-zone (R)%20LabView%20Driver%20a.zip

    I have 16 e / s digital connected to the CRDD and I need to use to trigger the SSR.

    so here's my question

    How to Set Digital i/o status of Watlow EZ - Zone RM on 'ON' in LabVIEW?

    What ID setting should I use to replace the OFF state (62) (63)?

    First I thought that I can write "63" in the ID parameter "6007", and it does not work because it is a read only parameter. Is it supposed to be a way I can just simple it switched off to change on?

    Thank you for answering my question.

    The OID cannot be set directly. First a block Variable must be digital and connected to the block of DIO mode. Then changing the numeric status can be changed (63) to off (62).

  • How can I trigger "Add tags to the document" via JavaScript?

    How can I trigger "Add tags to the document" via JavaScript? I am trying to add this fuction ITextSharp if when the user opens the pdf it could mark the document once it is opened automatically

    Is not possible.

  • How can I trigger an onchange for an item never displayed or hidden event

    Hello - I have a question that I don't want not displayed on my page - more information that the user wants or needs; Let's call him B. It must be
    defined by an event onchange of an visible element (A); Then, the change of triggers B on onchange to set another article (visible) - C.

    When B is visible on the page, it all works. If I hidden or conditionally never displayed, it does not. From the looks of
    He, B never gets changed.

    How can I trigger this event onchange (from B to C value) with no visible B?

    Thank you
    Carol

    Carol:

    Exactly how you set the value of B in the 'onchange' for A Manager?
    If you all work when B is not a hidden item, you should be able to define B as a text box, then use the 'visibility' CSS attribute to hide the loading of the page.

    $x('B').style.visibility = "hidden".

    CITY

  • How can simple trigger for verification of status update on the table... - I get upd sql then?

    Hi guys,.

    I need to do a temporary simple audit on all updates on a table.

    That's why I create a trigger for her...

    However, I need to capture the SQL statement to make the update as well... However I have no way to do it, because it is always replaced by a SQL code I run to get the SESSION ID...

    Here is the trigger...
    ----------------------

    create or replace
    alert_setting_trg relaxation
    before the update on user_alert_settings
    for each line
    declare
    number of v_sid;
    v_username varchar2 (100);
    v_osuser varchar2 (100);
    v_machine varchar2 (100);
    v_program varchar2 (100);
    v_module varchar2 (100);
    v_prevsqlid varchar2 (100);
    v_sqltext varchar2 (100);

    Start
    SELECT SYS_CONTEXT ('USERENV', 'SID')
    IN v_sid
    FROM DUAL;

    SELECT the username, osuser, machine, program, module, PREV_SQL_ID
    IN v_username, v_osuser, v_machine, v_program, v_module, v_prevsqlid
    SESSION $ v where SID = v_sid;

    SELECT sql_text
    IN v_sqltext
    V $ sqltext
    WHERE SQL_ID = v_prevsqlid;

    INSERT INTO alert_settings_log
    VALUES (sysdate, v_sid, v_username, v_osuser, v_machine, v_program, v_module, v_sqltext,: new.user_id,: new.service_grp,: new.alert_setting_id,: old.alert_active,: new.alert_active);

    end;


    Now the problem is that...
    the capture of SQL statement will always be

    SELECT SYS_CONTEXT ('USERENV', 'SID')
    IN v_sid
    FROM DUAL;


    and not the UPDATE table statement.

    1st quarter) I have to get the SID of the session before I could know what SQL it is running.

    However, once I get the SID, the SQL to UPDATE the SID is run changes the SQL that gets the SID.

    What can I do?

    Rgds,
    Noob

    Instead of to the request in three steps, do it in 1. Replace all three of your queries with something like:

    SELECT s.username, s.osuser, s.machine, s.program, s.module, q.sql_text
    INTO v_username, v_osuser, v_machine, v_program, v_module, v_sqltext
    FROM v$session s, v$sql_area q
    WHERE s.sid = SYS_CONTEXT('USERENV','SID') and
          s.prev_sql_id = q.sql_id
    

    John

  • Help! How to retain the OutputText component status in the browser when the restore operation is called?

    I managed to apply the texts of edtiable as output check the CAPTCHA function by using clientListener and serverListener. a group of texts are displayed using the tags < ad: iterator > in the output page, when you click on a text of output, it is alternated with the status of selected or deselected.

    then click on the button restore to call the application module restore operation, chose these texts out status will be clean in brower he but correspong values on the server side are still in selected state.

    My problem is that how can I retain the OutputText component status in the browser when the restore operation is called?

    I have also some ADF DURATION issues:

    a. when operation rollback is called, will be updated on all the components in the page?

    b. when I set "binding" compenent properties < ad: iterator > related to the backing bean property, why is there only one child to < ad: iterator > compenent: activeOutputText, not a collection of activeOutputText?

    c. when I try to set the property 'id' of activeOutputText with #{terminalItem.AbbrTerminalM} and run and it prompted this invalid id value. real value of this EL is alphabetical.

    JSF page:

    
            <af:resource type="javascript">
                function processTerminalCodeClicked(event){
                   var source = event.getSource();
                   var terminalCode = source.getProperty("terminalCode");
                   var isChecked;
                   if(source.getInlineStyleProperty("background-color")!=""){// selected
                      source.setInlineStyleProperty("background-color","");
                      isChecked = false;
                   }else{// not selected
                      source.setInlineStyleProperty("background-color","#94ff94");
                      isChecked = true;
                   }
                    AdfCustomEvent.queue(source, "terminalCodeClicked",  {'terminalCode' : terminalCode, 'terminalCodeChecked' : isChecked},  false);
                }
               
               
            </af:resource>
    
    ...
    
    
    <af:iterator id="i1" value="#{bindings.TerminalView11.collectionModel}" var="terminalItem" rows="100">
                                                <af:panelGroupLayout id="pgl6">
                                                    <af:activeOutputText  value="#{terminalItem.AbbrTerminalM}"
                                                                         id="aot1" clientComponent="true"
                                                                         inlineStyle="cursor:pointer; ">
                                                         <af:clientListener type="click"
                                                                           method="processTerminalCodeClicked"/>
                                                         <af:clientAttribute name="terminalCode"
                                                                        value="#{terminalItem.TerminalC}"/>
                                                         <af:serverListener type="terminalCodeClicked"
                                                                       method="#{pageFlowScope.yardPlanControllerManagedBean.processTerminalCodeClicked}"/>
                                                     </af:activeOutputText>
                                            </af:panelGroupLayout>
    </af:iterator>
    
    

    Managed bean:

    private List terminalCodeList = new ArrayList();
    ....
    public void processTerminalCodeClicked(ClientEvent clientEvent) {
          String terminalCode = (String)clientEvent.getParameters().get("terminalCode");
          Boolean terminalCodeChecked = (Boolean)clientEvent.getParameters().get("terminalCodeChecked");
    
          if(!terminalCodeChecked.booleanValue()&& terminalCodeList.contains(terminalCode)){
              terminalCodeList.remove(terminalCode);
          } else if(terminalCodeChecked.booleanValue() && !terminalCodeList.contains(terminalCode)){
              terminalCodeList.add(terminalCode);
          }
          if(terminalCodeList!=null && !terminalCodeList.isEmpty()){
             setValueToSession("currentTerminalCodeList", terminalCodeList);
          }else{
               FacesContext ctx2 = FacesContext.getCurrentInstance();
               FacesMessage msg2 = new FacesMessage(FacesMessage.SEVERITY_ERROR,"no terminal is selected!", "Please at least select one terminal!");
               ctx2.addMessage(null, msg2);
          }
    }
    
    

    I managed to reslove parts of the problem and the selected state of the output text can be kept now.

    Remember the State selected in the list in bean managed, trigger refreshing of the page layout group containing all the output text and selected status of the output is determined by inlineStyle = "#{pageFlowScope.yardPlanControllerManagedBean.terminalInlineStyle"} "

    JSF page:

    
                function processTerminalCodeClicked(event){
                   var source = event.getSource();
                   var terminalCode = source.getProperty("terminalCode");
                   var abbrTerminalM = source.getProperty("abbrTerminalM");
                   var isChecked;
                   if(source.getInlineStyleProperty("background-color")!=""){// selected
                      //source.setInlineStyleProperty("background-color","");
                      isChecked = false;
                   }else{// not selected
                      //source.setInlineStyleProperty("background-color","#94ff94");
                      isChecked = true;
                   }
                    AdfCustomEvent.queue(source, "terminalCodeClicked",  {'terminalCode' : terminalCode, 'abbrTerminalM': abbrTerminalM, 'terminalCodeChecked' : isChecked},  false);
                }
    
    
    
     
      
        
        
        
        
       
     
    
    

    Managed bean:

      private List abbrTerminalMList = new ArrayList();
    
        public void processTerminalCodeClicked(ClientEvent clientEvent) {
          String terminalCode = (String)clientEvent.getParameters().get("terminalCode");
          String abbrTerminalM = (String)clientEvent.getParameters().get("abbrTerminalM");
          Boolean terminalCodeChecked = (Boolean)clientEvent.getParameters().get("terminalCodeChecked");
          if(!terminalCodeChecked.booleanValue()&& terminalCodeList.contains(terminalCode)){
              if(terminalCodeList.size()>1){
                  terminalCodeList.remove(terminalCode);
                  abbrTerminalMList.remove(abbrTerminalM);
              }
          } else if(terminalCodeChecked.booleanValue() && !terminalCodeList.contains(terminalCode)){
              terminalCodeList.add(terminalCode);
              abbrTerminalMList.add(abbrTerminalM);
          }
         AdfFacesContext.getCurrentInstance().addPartialTarget(terminalsPanelGroupLayout);
        }
    
        public String getTerminalInlineStyle() {
            String inlineStyle = "cursor:pointer;";
            if(terminalActiveOutputText != null){
                String abbrTerminalM = terminalActiveOutputText.getValue();
                if(abbrTerminalM != null && abbrTerminalMList.contains(abbrTerminalM)){
                   inlineStyle = "cursor:pointer;background-color:#94ff94";
                }
            }
            return inlineStyle;
        }
    
  • I've recently updated for Firefox 6.0.2 (of office) &amp; love it but please can you tell me an EASY way HOW I can get the bottom status bar so I can see the status of my downloads, safe sites &amp; this synchronization is in progress or completed.

    Windows 7 64 bit
    Firefox v. 6.0.2
    Norton 360 v.5

    See here:

    What happened to the status bar?

    How can I go back to the old status bar?

    See also this add-on:
    Status-4-Evar

    Thanks again

  • How to display logins in the status bar?

    I have 3 x 220 s at work. Two of them show logins in the status bar and we didn't.

    No idea how to get one that is not to show?

    Thank you

    Hmm, just found.

    (1) go dial-up connections.
    2) click Tools.
    (3) parametres_globaux.
    (4) notifications.
    (5) check access connections of gas Show in the taskbar.

  • How can I trigger a Boolean control from a Boolean indicator?

    Hello

    I want to trigger a Boolean control (like a button) to a true value as soon as my indicator (LED) Boolean Gets a value of true.

    Can someone tell me how to do this?

    You can use either a local variable or a value of property node to define a control value.

    Right-click on the control and create/Local Variable or Create/property/value of the node. Change the property node or a variable to write mode by right clicking on it and selecting "modify to write." Local variables can default to write (do not remember) but I know that failure of nodes of property for the playback mode.

    I prefer the nodes property simply because they have a mistake in and out, so I can control the flow.

    [Edit:] Remember that you must pass instead of locking for the mechanical action. If you need a locking Boolean control and need programmatically set its value, then you need to reset the State after reading using either a local node or property.

  • How to send frames to header + 1 byte of data in network LIN?

    Hello

    I use USB-8476 to communicate to a slave in a LIN network. Can someone tell me how I can send a header file more 1 byte of data to the slave in a LIN network.

    I need to send a sync + id 00 X 34 break, followed by a byte of data. I don't know how a master can send this extra 1 byte of data. I need to send this command to the LED and byte 1 to control the level of illumination of the LED lights.

    If anyone has examples for this, can share you here?

    Thank you

    Hi Andreas,

    This error has not yet been documented, but I got the information on the other forums.

    Error name error Code (hex) description

    Task-master of 1040 LinBusErrorTxSyncTimeout LIN interface is trying to send a

    synchronize the bytes and not not not receive the sync byte

    during the period.

    This is the description. The problem is solved, the baud rate I gave was higher than the speed of the slave units. Now, it seems to work correctly.

    Thank you.

  • How to analyze the data of 10 bytes encoded in the HH306 of Omegatte data logger/thermometer?

    I am trying to write a simple code for a HH306 of OMEGAETTE thermometer/travailleursduweb.com data recorder.

    That is the problem. I communicate with the device via RS - 232, using Labview 8.5.1 and windows xp. I ask her for "all the coded data", which is actually the only option. He returns 10 bytes of encoded data, the manual describes the meaning of each byte and I understand that. The problem is that I can't analyze the information for use in labview, for example: I want to extract the temperature and simply display it.

    on request, I get: 10bytes (read as a string from the serial port read buffer): display HEX: 02 00 A8 48 FF EF B6 49 B6 03 is perfect, and what I expect.     Display codes: \02\00\A8\B6H\FF\EF\B6I\03 The Normal display is a series of special characters, I don't understand, especially since I don't think they are ascii characters that must match returned hexadecimal numbers!   For the life of me, I can't understand how to extract the information (what are the 48 6 hexadecimal display) of what is returned. All string manipulation functions seem to work only on what is given in Normal view. (The 4th and 5th byte of the data are the codes of the BCD for temperature: for example the temperature was 64.8 degrees farenheight when I took this reading).

    Can someone help me to analyze the data returned by this device?

    Ok... I think that I thought about it. I found this: http://digital.ni.com/public.nsf/websearch/77C8F61D36F5A23086256634005ACB38?OpenDocument.

    I guess the normal display garbled is corresponding to each hexadecimal ascii characters. I'm just not used to seeing characters beyond the decimal number 127 ascii or hex 7F.

    So, basically, to analyze the 10 bytes of data:

    (1) break the string read from the serial port in the 10 ascii characters (using String subset vi)

    (2) son of each output string in the left input of 10 separate Type vi Cast.

    (3) wire a constant U8 in each terminal 'type' VI Type Cast.

    cables of 4) the chain of each Cast of Type vi output to the input of a number hexadecimal string vi.

    (5) concatenate or use as you wish as hexadecimal numbers (now in string format) which cause.

    See you soon.

  • How can I trigger on falling and rising slope?

    Hello

    I have this VI attacked and trigger a rising, downward slope. How can I add both? Right now I am only able to choose between rising and falling, but I want to have both so that it triggers as soon as the slope rises and also trigger when the slope descends.

    Also, I get the error of 2000777 on Start.TrigType. What does this error mean?

    An error on the function replaces the function of error at the end of your code Manager.  This way you can read the error by yourself.  I don't memorize all the error codes.

    You can put sensors on all the sons of the error to see where the error occurs.  The error probably has something to do with certain configuration is not not available for your particular card.

  • How do 9229 trigger by analysis of data

    Since 9229 (USB casing) has no external analog trigger; the signal lasts 12 seconds.

    I need to scan data collection the long, until the trigger threshold voltage is detected, then beginning to collect 12 seconds signal.

    But after the detection threshold, some data may already lost when the start of collection time 12 seconds.

    Also ' How do make a scan ", the scan to read th data should be in a loop. If set the duration for each big loop, then maybe the loss of data, but if too samll, then can make the Windows.

    Any suggestion how to read the analysis of data from the device. Thank you.

    Hi Turbot,

    You can just continuously sample and store the data in the table.

    If the size of the data is greater than 12 second pad just outside, and the threshold is reached, use the subset of table data to select just 12 second part.

    You can see my attached sample for more information.

    Sincerely, Kate

  • How to effectively change decimal numbers hexadecimal bytes streaming?

    Technical support,

    There is an instrument connected to a serial port on my computer which is streaming 25 bytes of hexadecimal data every second.  After changing the display for "Display Hex" mode, I can now see the hexadecimal bytes instead of Laura.  I use the "Hexadecimal string to number" vi with marginal success.  I mean, that (1) I can't convert the entire hex string at all, and (2) when you use "String subset" to analyze different hexadecimal bytes I'm able periodically to convert a hexadecimal byte to a whole number.  I tried the suggestion of molded type indicated in a previous post on this subject without change of achievement, although I do not quite understand how it works (how to set correctly the type?).  Do I need a buffer to convert continuous hexagonal data streaming?

    I would send my vi, but it is quite simple.  25 bytes of hex data in every second (1 second buffer), Index 0, default U32, sent to an indicator.  At this point, all I want to do is see my data.  I'm using LabView 8.5.1.  Please indicate if I should provide more information.  Thank you.

    ~ Going bananas

    CodeMunkee wrote:

    After changing the display for "Display Hex" mode, I can now see the hexadecimal bytes instead of Laura.  I use the "Hexadecimal string to number" vi with marginal success.  I mean, that (1) I can't convert the entire hex string at all, and (2) when you use "String subset" to analyze different hexadecimal bytes I'm able periodically to convert a hexadecimal byte to a whole number.  I tried the suggestion of molded type indicated in a previous post on this subject without change of achievement, although I do not quite understand how it works (how to set correctly the type?).  Do I need a buffer to convert continuous hexagonal data streaming?

    I would send my vi, but it is quite simple.  25 bytes of hex data in every second (1 second buffer), Index 0, default U32, sent to an indicator.  At this point, all I want to do is see my data.  I'm using LabView 8.5.1.  Please indicate if I should provide more information.  Thank you.

    If your data looks correct when you set the display string for hex, the 'hexadecimal string to the number"is NOT the right tool (it hexadecimal sat in the format of strings containing ASCII characters 0...) F only). You have a binary string so labeled is the right tool. If you want the first 4 bytes as U32, simply create you a diagram representation U32 constant (the value is irrelevant) and connect to the entrance of type type conversion. The output will be a single wire digital U32 containing the desired output.

    What is in the rest of the string? It cannot be U32 except if there are a few characters to terminate employment. Want to see one of the remaining data? In this case, you will need to tell us the structure.

    So please create a flag for the string of your own, run the VI it contains data, then convert the flag to a constant of diagram (right click on Terminal... change to constant: this way to see what you actually). Now, save the VI and attach it here. Tell us what value you expect. (Things could be a little more complicated if you have BOM with the little rule).

    I have a don't know what you mean by "continuous" data. How much history you want to keep? You want to stream to disk? If you just want to see recent history data, connect to an array whose length desired history.

  • Photosmart 7520 - how to display on-screen printer status report

    How can I display on the screen of the monitor or printer sales 'Total printed pages', otherwise, I have to often print "keep your computer > device reports > print status report?  I use HP Photosmart 7520e, connected wireless, Windows 7 of the month last thank you.

    Hello emmandell,

    Welcome to the HP Support forums.  I understand you want to learn how to view your number of pages without having to print a printer status report.

    The information can be accessed online using the integrated web printer (EWS) server.  Please follow the steps below:

    1) press the wireless icon on the front of the printer to find the ip address of the printer.

    (2) type the ip address of the printer in the address bar of your browser, this will bring up the SAP. I recommend that you bookmark this page for future use.  Then click on the tab "Tools".

    3) click 'Reports' on the left side menu

    (4) this example displays a screen of use with the total pages number in the upper part

    Hope that allows you to save on ink and paper.

Maybe you are looking for

  • Triple booting with rEFInd

    Hi all! I have just set up my Mac Mini to triple boot (macOS, Ubuntu and the 10 version of this other OS) and when I start it, it starts only the third in the list. Although I rEFInd it worked before installing Windows 10, it starts not at all now. H

  • Explorer freezes on new Tecra M5 T2600

    When you use Windows Explorer or Internet Explorer on the new Tecra M5 T2600, the active window in Solution Explorer or IE freezes often when you browse a web page in IE or navigation in local folders using the folders pane in a window of Windows Exp

  • Read and reply to Whatsapp with injection of motorcycle

    AlphaDog or someone else, do you know if the option for reading aloud and answer telegram or Whatsapp messages while driving or at home will be available? It'll be great to include this option, because given that data plans, at least here in Mexico,

  • Change a .vi to breast. LLB

    Hello I have a bunch of. Live in a library I got a SDK, and I need to change some of the VI. I can open the VI and view the block diagram, but when I right click on things or try to change it, it won't let me. Is it possible to do this editable VI? H

  • OfficeJet Pro 8615: Fax a lot of page at a time

    I used my all-in-one for faxing several times beautifully, but when I need to send a response to an offer of our agency of 33 pages, I guess it was too much to do at once, then divided into two separate Fax. The first batch was 16 pages, but stuck on