Port resets the value after calling DAQmxStopTask.

Hello? My device is PCI-6025E and I used to reset by sending 0x00 on #0 with DAQ digital output port. It must be reset if the VC software button power ++ is pressed.

But after a trial of DAQmx, even after that I sent 0x00, it will be set the value of 0x00 to 0xFF after calling DAQmxStopTask. I want to know how do I know it's 0x00, ahead of DAQmxStopTask.

I tried to read the port #0 when writing of 0x00 in this regard, but it hangs or it returns error; He said that the port is reserved and can not read the port until the task (in writing) is completed.

Here is the code that I tested.

error int = 0;
TaskHandle taskHandle = 0;
TaskHandle DItaskHandle = 0;
uInt8 data = 0 x 00;
char errBuff [2048] = {'\0'};
Int32 wrote;
Int32 read;
uInt8 dataToRead;
bool32 bTaskStatus;

DAQmxErrChk (DAQmxWriteDigitalU8(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&data,&written,)); creaded the 6.5.2009
DAQmxErrChk (DAQmxIsTaskDone (taskHandle & bTaskStatus));
DAQmxErrChk (DAQmxWaitUntilTaskDone (taskHandle, 1.5)); 6.5.2009

{if (bTaskStatus)}
Reading test - DI on written port0-/ / / 6.5.2009
DAQmxErrChk (DAQmxCreateTask("",&DItaskHandle));  6.5.2009
DAQmxErrChk (DAQmxCreateDIChan (DItaskHandle, "port0/Dev1", "", DAQmx_Val_ChanForAllLines)); 6.5.2009
DAQmxErrChk (DAQmxStartTask (DItaskHandle)); 6.5.2009
DAQmxErrChk (DAQmxReadDigitalU32(DItaskHandle,1,10.0,DAQmx_Val_GroupByChannel,&dataToRead,1,&read,)); 6.5.2009
printf ("acquired data: 0x%X\n",dataToRead "); 6.5.2009

}

Try to use the node property DAQmx to reverse digital lines.

According to the that you configure DI / use the following

Int32 __CFUNC DAQmxSetDOInvertLines (TaskHandle taskHandle, const char [channel], data bool32);

Int32 __CFUNC DAQmxSetDIInvertLines (TaskHandle taskHandle, const char [channel], data bool32);

Kind regards

Glenn

Technical sales engineer

National Instruments

Tags: NI Hardware

Similar Questions

  • LOV in richeTableau resets the value after the deletion of rows from the table

    Hello. I'm on 11g R2

    I have a table with columns in the box and a button in the toolbar that removes the lines checked

    I have build it based on the following article in her string code

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html


    When I run the "delete" button I execute the following code (taken as is article)


    public void deleteSelectedRows() {}

    create a second line, the value do not affect all lines

    used in ADF

    Set of rows duplicateRowSet = this.createRowSet ("duplicateRowSet");

    first row to avoid "the attempt to access the value of lines."

    exception line was dead.

    duplicateRowSet.first ();

    retrieve the current row of the table for after

    re-running the VO

    Line currentRow = this.getCurrentRow ();

    Boolean currentRowDeleted = false;

    get all rows that have the transoent attribute

    "MarkForDelete' set to true

    Row [] rowsToDelete =

    duplicateRowSet.getFilteredRows ("MarkedForDelete", true);

    If (rowsToDelete.length > 0) {}

    run only throizgh this code, if there is something to

    delete

    for (line rw: rowsToDelete) {}

    If the row is marked as the current in VO, ts value

    Boolean flag

    If (rw.getKey () .equals (currentRow.getKey ())) {}

    currentRowDeleted = true;

    }

    remove the line - do not yet commit

    RW. Remove();

    }

    rerun VO

    this.executeQuery ();

    reset the current line if it has not been removed

    If (! currentRowDeleted) {}

    this.setCurrentRow (currentRow);

    }

    duplicateRowSet.closeRowSet ();

    }

    }

    "MarkedForDelete" is a transient attribute used to mark the line delete

    The lines are removed very well.

    The problem is with lines that I do not delete.

    For example I LOV column. I chose the value LOV in a few lines, and after that choose to delete several lines (not the same lines where I modified the LOV) but some other lines.

    After I click "delete", the lines that I marked to remove deleted indeed, but the value of the LOV in other rows (I have not scored for delete) are disabled.

    How to preserve value LOV so it will remain also after I deleted some lines?

    P.S. I've tried autosubmit = "true" - it did not help

    It is expected because I see that you rerun the query.

    Once you re - run, it retrieves from the database again. Thus, your values are lost because they are not posted.

    I don't think that run query is necessary, try to have a programmatic part trigger on the table after you remove all of the lines.

    Thank you

    Alisson.

  • Reset the value of the selection list

    APEX version: 4.2.2

    I'm fighting to implement a solution to reset the value of an element from the list of selection on a page in my application.

    I currently have about 4 pages in my application with a level of tabs with every page on its own tab.

    I have a report of Emp page that lists employees. The page contains an element of selection list for emp_no who submits the page when the value changes. The query for the list of selection queries the emp for name and emp_no table. It has:
    Display additional values: Yes
    Display Null values: Yes
    Display NULL value: all THE
    Return NULL value:
    (no value for the return NULL value)
    Page, in itself, works the way you want. During the first visit to the page, EVERYTHING is selected and the report shows all the EMOS. If I select a specific employee, the page refreshes with just this employee.

    On the Main page is another employee list report. The report has a link between the employee id column and the Emp report page. The link sets the value of Emp.emp_no to the value of Main.emp_no. It works very well so if I take emp hand 123, 123 shows Emp.emp_no and the report shows that retail for emp 123.

    The problem is when a specific employee has been selected previously from the homepage or the Emp page and I click on a tab to another page, say the status tab / page and then click on the tab of the page of the Emp. The current behavior of the page, is that it continues to show some used was previously selected regardless of how it has been set, either Emp or to the homepage page. I want to reset select Emp.emp_no ALL (or null) if I navigate to the page of the Emp to any other page except hand or Emp itself.

    I searched through the forums and tried to use processes at the level of the page and after region to reset the value of Emp.emp_no, but nothing has worked. I believe there is a 'simple' way to do it that doesn't require coding on each page to set Emp.emp_no on a null value before calling it.

    I would like ideas on solving this seemingly simple task that has managed to escape.

    Thanks in advance.

    cagora

    Use a query in your link for filtering the selection list. Create a compuation on the definition page of the selection to NULL list if the request is NULL > PL/SQL Expression >: APPLICATION IS NULL. In this way, you can check the list of selection gets nulled while accessing the page normally.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    https://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to reset the value of a list of entry of null values

    Hello

    Jdev 12.1.3.0

    How to reset the value of a list of entry of null values

    Thank you

    AR

    Place this code in your ViewRowImpl (base) class and use it when you need to reset _all attributes applied by LOV

    @Cvele: in fact, this will happen "by design" when you set the attribute which has attached lov to null, so there is no need of additional code.

    See also this blog: binary: prevent the execution of query unwanted in British Colombia ADF when used in Non - UI applications

    My previous answer is more related to this approach:

    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator = bindings.findIteratorBinding("IteratorName");
    Row r = iterator.getCurrentRow();
    r.setAttribute("SomeAttrib", null);
    

    Dario

  • reset the value of entering text on certain conditon

    Hello

    I'm new to ADF.this is my first post. I entered text.i want to clear or reset the value of certain conditions. How to do this?

    Bind the inputText in managed bean and try the resetValue() method by setting if and other condition

  • Extract the value after the period

    Hello

    I am trying to extract the value from each period.

    I have the table data is stored in this mode 172.168.15.10, which is an IP address,.


    My requirement is I need to first value in a query with must return 172
    If I need the value after the second period, it should return 168


    Please suggest me how to write a SQL for the above requirement and oracle 11i Enterprise edition as the database.


    Thank you
    Sudhir

    with regexp

    select
      regexp_substr('172.168.15.10', '\d+', 1, :pos) s
    from dual
    

    without regexp

    select
      substr(s
            , instr(s, '.', 1, :pos) +1
            , instr(s, '.', 1, :pos + 1) - instr(s, '.', 1, :pos) -1
      ) s
    from (select '.'||'172.168.15.10'||'.'
     s  from dual)
    

    Edited by: chris227 the 01.10.2012 01:23

  • Need help to reset the values and toggle items based on a value

    Experts,
    I have a problem with the set_item_property
    Here's the background. I have a form with a single block, and a canvas. He has 10 points, depending on the value of the first element, the remaining items can be enabled or disabled.

    I wrote a trigger "pre-record", whereas before the outputs in the new record based on the value of the first element of the new record the other elements in the new record are enabled or disabled.

    The problem is any value of the box, if I put it in set_item_property ('blockname.item_name ', set', property_false), sound very good, but in a new record, when I tried to
    activate the same element to help set it set_item_property('blockname.item_name',enabled,'property_true) it does not work.

    In singles, I can do as property_false but not back to property_true.

    And when I used the command set_item_property ('blockname.item_name ', on', ") to reset the value back to its design time value form is to throw an error
    withMessage ' FRM-41046'.»

    Guys I need your help on this. Please let me know how can I this and why the error message when I try to reset the value.

    Property_false value ENABLED also affect the Update_allowed/Navigable FALSE at the same time. You must set these properties to return true explicitly, if that's what you hear ' market do not. Search for 'Propagation of changes to property' in Froms help for more details.

  • Reset the value of a group of Radio

    Hello

    I have several groups of radio... If I click on one, I want to reset the value of the other null... How to do...

    Thank you

    Hello

    The value radio attributes of HTML form elements

    onchange="$s('Px_YOUR_ITEM','')"
    

    Where Px_YOUR_ITEM is another name of radio group like you reset

    Example here
    http://Apex.Oracle.com/pls/OTN/f?p=27625:1

    Select first something ename radio and then select Yes / No radio must be able to deliver

    BR, Jari

  • How to reset the OAMessageChoiceBean after the payment default value

    Hi all

    I extended the default controller the poplist value based on the user login. However, after default value, its not allow me to choose a different value.
    My requirement is after the value of default, we must give flexibility to the user to choose a different value if they want to.
    Please help me how achevie this. Thanks in advance for your help.

    OAMessageChoiceBean oamessagechoicebean2 = (OAMessageChoiceBean) webBean.findChildRecursive ("ExpTemplate");
    oamessagechoicebean2. SetText (PageContext, TemplateID);
    oamessagechoicebean2. SetValue (PageContext, TemplateID);
    oamessagechoicebean2.setAllowBlankValue (false);
    oamessagechoicebean2.setPickListCacheEnabled (false);

    concerning
    Krishna

    How close the thread when the problem is resolved.

  • Reset the value of the item page to null

    Hello
    On one of the pages of my site, my I list of some articles and each value of the element is a link, and if I click on the name of the element, a pop up appears which shows me the history of the issue. This pop-up history item, I have two elements of date picker where I provide the start and end date between which I want to see the story from this point. I add two calculations (before header) to set the values of the selectors of dates for the minimum and maximum dates for the mark of history goes back to this article in the database and on the first time, a complete history of the item turns in pop. Now I can choose my own minimum and maximum dating bicker date element and press a button, now the pop up refreshes and shows me the story between the dates, I have chosen.
    Now I close the pop-up windows and click on something else, but here when pop up is charged, I see the old values of date (that I selected for the previous article) in the date picker and ideally my calculations must have worked and dates selectors should see the minimum and maximum dates for this item.

    Can someone help me solve the problem so that if ever a new pop-up is open to a new element, the element in date picker must have updated them to the values that should be linked to the new item I clicked on that moment rather than date of previous section values.

    Thanks in advance

    Salman

    Hello Salman,

    I think I understand now what you are aming at.
    You say you have a calculation for the popup that defines the values where they are used for the first time. What conditions you have on these points? I guess they are submitted every time that you run the update, so the State of the item is updated with these values. If you don't reset it, these values will persist and be taken to the next item, which is what you currently see.
    You can place a process in your calling page that resets the page desired elements to be null before your calculation evaluates their condition, so the calculation allows you to retrieve the values of database. Another option would be to send a trigger element (for example a hidden item PX_TRIGGER get value 1 on submit) to the target page, which is part of the condition of your calculation (PX_TRIGGER = 1) and reset the trigger in your calculation (: PX_TRIGGER = 0).
    Please correct me if I am wrong.

    -Udo

  • While/loop and reset the value i in time loop

    Hello!

    I have a question about the use of while/loop for.

    I read the data of 5 devices.

    Starting with the 0 position when I = 0, I read the data at position 0.

    And when I click on NextPosition, then I = 1 and stop when I = 5.

    But in the meantime, if I want to break the system of position 3 for now. I click on the BREAK.

    I chose the position back to 0, it will go to this post.

    But if I click on NextPosition, the value is always my 0 and not 1, which is the next position upward.

    In addition, whenever I click NextPosition, it will count up to i = 5 and to stop the program.

    Is there a way I can address the issue?

    Thanks for trying!

    I don't know what your needs are, so I guess you want to keep hitting the same device until you press the button of the next device and you want to be able to specify that one then.

    In the attached code, I changed your mechanical action of the pause button and renamed position Reset.

    I also changed the code suchthat conditionally, we increment the device number (only when the next button is hit).

    I have alos moved local so that us do not draft times and put it in the case of the rest the structure so it is written or read but not both.

    If this does not meet your needs;

    1) look in bulb mode and see where I went wrong

    (2) If you are unable to set up a truth table of all combinations buttn and doc what steps should occur for each condition.

    Always trying to help,

    Ben

  • How to reset the value of selectOneChoice when it is af:table

    12.1.3 Jdev

    I need to reset the selectOneChoice of the first empty value when you click a Refresh"" button.  The selectOneChoice is located in one of the columns of af: table.  I tried to reset by getting the selectOneChoice component and set the value to «»   Please see the snipplet of code for more details. However if the selectOneChoice is not within the af: table, then using the same way to reset works!

    in jspx

    "< af:commandToolbarButton id ="ctb15"icon="/images/refresh_qualifier.png "shortDesc ="Refresh"action =" #{viewScope.backing_requestOverview.onRefresh} "partialSubmit ="false"> < / af:commandToolbarButton >"

    < af:table value = "#{bindings." ItasTaskAssigneesListVO1.collectionModel}.

    var = "row".

    lines = ' #{bindings. " ItasTaskAssigneesListVO1.rangeSize}.

    emptyText = "#{bindings." ItasTaskAssigneesListVO1.viewable? "{'No data to display.': 'Access Denied.'}".

    fetchSize = "#{bindings." ItasTaskAssigneesListVO1.rangeSize}.

    rowBandingInterval = '1' id = 't4 '.

    styleClass = "AFStretchWidth."

    columnStretching = "column: c1.

    rowSelection = 'single '.

    selectionListener = "#{bindings." ItasTaskAssigneesListVO1.collectionModel.makeCurrent}.

    selectedRowKeys = ' #{bindings. " ItasTaskAssigneesListVO1.collectionModel.selectedRow} ">"

    < af:column id = "c6" headerText = "Action".

    rendering = "#{bindings." EventLevelTypeCode.inputValue! ' = ' 10 G ' & amp; & amp;! viewScope.backing_requestOverview.isReadOnly} ">"

    < af:selectOneChoice id = "soc2".

    autoSubmit = 'true '.

    valueChangeListener = "#{viewScope.backing_requestOverview.onChangeMyPendingAction} '"

    Disabled = "#{!}" line. TaskActionEnabled} ">"

    < f: selectItems value = "#{backing_requestOverview.actionsMap [row." StatusUid]} ".

    ID = "si3" / >

    < / af:selectOneChoice >

    < / af:column >

    < / af:table >

    < af:selectOneChoice id = "soc222" >

    < af:selectItem label = "Complete"

    value = "COMPLETE"

    ID = "si4" / >

    < af:selectItem label = "Assign".

    value = "ASSIGN".

    ID = "si555" / >

    < / af:selectOneChoice >

    Java bean:

    public String onRefresh() {}

    RichSelectOneChoice actionDropdown = (RichSelectOneChoice) JSFUtils.findComponentInRoot ("soc2");

    actionDropdown.setValue("");

    RichSelectOneChoice actionDropdown2 = (RichSelectOneChoice) JSFUtils.findComponentInRoot ("soc222");

    actionDropdown.setValue("");

    If (actionDropdown! = null) {}

    AdfFacesContext.getCurrentInstance () .addPartialTarget (actionDropdown);

    }

    If (actionDropdown2! = null) {}

    AdfFacesContext.getCurrentInstance () .addPartialTarget (actionDropdown2);

    }

    }

    Please notify.

    Thank you

    -Mina

    The root of the problem remains the same. As long as you don't set a value for each of SPC property that you use, you cannot reset them without running into trouble.

    An soc within a table must be stored too, you must provide the form of attribute value each of them. If you only use a soc, to distinguish the action to take, it belongs in the table.

    Timo

  • update line and reset the value of the column

    I have table (CORS_MTR) with 3 columns...

    SEQ ID of the EPR the ID of the child / / desc
    100221one
    101222two

    new entry as 1 number , that means change the flow of child #

    102223three

    When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...

    SEQ ID of the EPR the ID of the child / / desc
    100222two
    101221one
    102223three
    103224four
    SEQ PRT_ID CHILD_ID DESC_
    100 22 1 one
    101 22 2 two
    102 22 3 three

    declare

    number of p_seq: = 103;

    number of p_prt_id: = 22;

    number of p_child_id: = 1;

    p_desc varchar2 (25): = 'a ';

    Start

    Update cors_mtr

    set seq = case when child_id = p_child_id

    then seq + 1

    other seq - 1

    end

    where prt_id = p_prt_id

    and child_id (p_child_id, p_child_id + 1);

    insert into cors_mtr (seq, prt_id)

    values(p_seq,p_prt_id);

    Update cors_mtr

    Set child_id = (select max (child_id) + 1 of the cors_mtr).

    desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)

    where child_id is null.

    end;

    SEQ PRT_ID CHILD_ID DESC_
    100 22 2 two
    101 22 1 one
    102 22 3 three
    103 22 4 four

    Concerning

    Etbin

  • Process of calculation to calculate the value after submit after all validations

    Hello

    Please help with a possible approach or suggestions for the calculation process.

    I have a calculation process after submit I want to calculate its value after that all validations are handled. Because this process of calculating trim is off of the first part of the input string of the user for the P3_USES element. Thus, for example consider; the user selects a value for P3_USES (point list manager) to be "TAC"... BCA... BCA... BCA... 0.CA BC... "CA IT BC. So my calculation process just stripes off the coast of the first portion of the string and computes the value will be "BCA"... BCA... BCA... 0.CA BC... "CA IT BC. It works fine when all postings on the page are placed without cooking.

    The problem occurs, then the validation fails on the form. Once the validation fails, the calculation process; already calculates the value and the P3_USES value form element is set to "BCA"... BCA... BCA... 0.CA BC... "CA IT BC. So, here the user solves the problem of validation and sends it again the form, but at this point the value is calculated again but this time that my string is "BCA"... BCA... BCA... 0.CA BC... CA IT BC"which is not correct, because my initial user string entry was"TAC"... BCA... BCA... BCA... 0.CA BC... "CA IT BC.

    So my question is how they treat the value of my calculation after all validations. While I can keep the original value of the P3_USES element. I'm using the version of Oracle APEX 4.0 and Oracle 10 g R2 database.

    Thank you

    Rambeau

    Hello

    Combine code of calculation and validation?

    Perform the calculations in the process?

    Use another element to contain the value 'real '?

    Kind regards

    Jari

  • How to reset the value of line number for each header

    Hi all

    I need to reset the line number for each header values.

    create table header_table (header_value varchar2 (100));

    create table line_table (header_value varchar2 (100), number line_number);

    insert into header_table values ('ALAOF');

    insert into header_table values ('ALAOO');

    insert into line_table values('ALAOF',1);

    insert into line_table values('ALAOF',2);

    insert into line_table values('ALAOF',3);

    insert into line_table values('ALAOF',4);

    insert into line_table values('ALAOF',5);

    insert into line_table values('ALAOO,6);

    insert into line_table values('ALAOFO,7);

    insert into line_table values('ALAOO',8);

    insert into line_table values('ALAOO',9);

    insert into line_table values('ALAOO',10);

    insert into line_table values('ALAOO',11);

    insert into line_table values('ALAOO',12);

    Commit;

    TABLE HEADER_:

    header value

    ALAOF

    TRECYBEL

    LINE TABLE:

    header value line_number

    ALAOF 1

    ALAOF 2

    ALAOF 3

    ALAOF 4

    ALAOF 5

    TRECYBEL 6

    TRECYBEL 7

    TRECYBEL 8

    TRECYBEL 9

    TRECYBEL 10

    TRECYBEL 11

    TRECYBEL 12

    But looks like I got out of line below table

    LINE TABLE:

    header value line_number

    ALAOF 1

    ALAOF 2

    ALAOF 3

    ALAOF 4

    ALAOF 5

    TRECYBEL 1 <-reset the beginning of line number with 1 with different header value

    TRECYBEL 2

    TRECYBEL 3

    TRECYBEL 4

    TRECYBEL 5

    TRECYBEL 6

    TRECYBEL 7

    Please help me on this.

    Thanks in advance.

    Hello

    It makes no sense to do it in PL/SQL when you can do it with SQL.

    SQL is generally more efficient than PLSQL.

    And can you explain why you don't want to use analytical functions?

    This will update your table using a MERGE statement and an analytic function:

    MERGE INTO line_table lt
    USING
    (
       SELECT ROWID rid, header_value, row_number() OVER(PARTITION BY header_value ORDER BY ROWNUM) rn
         FROM line_table
    ) src
    ON (src.rid=lt.ROWID)
    WHEN MATCHED THEN
       UPDATE SET lt.line_number = src.rn;
    

    The result is less to:

    HEADER_VAL LINE_NUMBER

    ---------- -----------

    ALAOF 1

    ALAOF 2

    ALAOF 3

    ALAOF 4

    ALAOF 5

    TRECYBEL 1

    TRECYBEL 2

    TRECYBEL 3

    TRECYBEL 4

    TRECYBEL 5

    TRECYBEL 6

    TRECYBEL 7

    Kind regards.

    Al

Maybe you are looking for

  • Why cannot delete apps from the iphone 6 more pressing the app?

    Whenever I press the app he started to dance, but the x button not appeared.

  • Why are the deleted iOS9.1 emoji (e.g. Kadomatsu)?

    Why traditional emoji (characters Japanese emotion) looked like kadomatsu (Japanese Shinto of years welcomes new spirit) removed from iOS9.1? Kadomatsu y in IOS keyboards back years on my old iPhone3GS. It seems the discrimination against practitione

  • HP 7280 sorry, an unknown error has occurred. Mac 10.6.6

    I have an IMac with 10.6.6 and my Scan-Pro software does not work on the HP Photosmart C7280 all-in-one.  It has worked before, and now I get this error message.  I can print.  I can also scan with the Preview Image capture &.  But I have to be able

  • Nero Showtime "Cannot build the chart" error

    In general, Windows 7 RC works without problem on my Toshiba Satellite laptop. However, it returns an error "Can not build Graph" when I try to launch Nero Showtime 7. Another blog suggested that an uninstall of the user, restart the computer and ins

  • Fabian Rosado - Laptop takes time to start

    Hello My name is Fabian Rosado.Few days back that I just bought the new Dell! XPS 13 Laptop w / 6th Gen Intel Core. I'm a fan of Dell and used their products for my office and home, but for the last few days that my laptop takes a long time to start,