The use of DaqMX for reading the State of 2503 PXI or PXI-2527 switch

I was wondering if there was a way to non-destructive know what that setting of the State. I'm working on some diagnostic software to be run along the side of our tests, and it would be really useful to be able to know what each of the channels are switches are currently connected to.

In c#, I use this to actually set the channel-

DaqSystem.Local.ConnectSwitchChannels (channel 1, canal2, true);

but have not actually been able to find something on because what channels is currently defined. I found this.

DaqSystem.Local.CreateSwitchScanTask

but I'm not sure it's what I want to do.

Any advice?

Thank you!

Hi Joel,

I believe that this is the function you're looking for.

Help OR switches can be found in the start menu, National Instruments, OR-Switch and Documentation.

Thanks for the question!

Lisa

Tags: NI Hardware

Similar Questions

  • Need help on the use of Partition for a SELECT statement

    -Hello everyone,
    -This my request. I'm a junior developer of the APEX.
    -database version is 11g version 4.0 apex
    DEFINE startmonth = "Aug 2012";
    DEFINE endmonth   = "Oct 2012";
    WITH  all_months  AS
    (
       SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month
       ,      ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM  ) AS next_month
       from all_objects
       where
       rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1))
    )
    ,
    lt_event_type_a AS
    ( select event_type, active, e_id 
      from lt_event_type
      where active = 1
    )
    ,
    engagement_event_a as
    (SELECT * FROM engagement_event
     where active =1
     )
    
    select lt_ev.event_type,TO_CHAR (am.which_month, 'Mon YYYY')  AS month, count(ce.engagement_id) as monthly_events_per_event_type
      from lt_event_type_a lt_ev
      
      left join engagement_event_a ev  on
        lt_ev.event_type = ev.event_type
      
      left join court_engagement ce on
        ev.e_eng_id = ce.engagement_id
         and ce.court_name like '%' --will be filtered with a court_name parameter
     
      right join all_months am on
        ce.date_joined_court <= LAST_DAY(am.which_month) 
        and (ce.date_terminated is null or ce.date_terminated > LAST_DAY(am.which_month) )
     group by rollup(lt_ev.event_type, am.which_month)
     order by lt_ev.event_type, am.which_month ;
     
    - and the results are
     EVENT_TYPE                                         MONTH             MONTHLY_EVENTS_PER_EVENT_TYPE
    -------------------------------------------------- ----------------- -----------------------------
    Absent without leave                               Sep 2012                                      1 
    Absent without leave                               Oct 2012                                      1 
    Absent without leave                                                                             2 
    Court Appearance                                   Sep 2012                                      2 
    Court Appearance                                   Oct 2012                                      3 
    Court Appearance                                                                                 5 
    Incentive granted                                  Aug 2012                                      1 
    Incentive granted                                  Sep 2012                                      2 
    Incentive granted                                  Oct 2012                                      1 
    Incentive granted                                                                                4 
    Judicial direction                                 Oct 2012                                      1 
    Judicial direction                                                                               1 
    Police report                                      Sep 2012                                      2 
    Police report                                      Oct 2012                                      2 
    Police report                                                                                    4 
    Positive test                                      Sep 2012                                      1 
    Positive test                                      Oct 2012                                      1 
    Positive test                                                                                    2 
    Sanction imposed                                   Aug 2012                                      1 
    Sanction imposed                                   Sep 2012                                      1 
    Sanction imposed                                   Oct 2012                                      1 
    Sanction imposed                                                                                 3 
                                                                                                    21 
    
     23 rows selected 
     
    - but the condition is that I list all types of event in the search list
    -with a total number of events by event type for each month in a number of calendar months (user will select months like August 2012 or a range of month August 2012 - October 2012)
    -the query above just list all the events (see table engagement_event) that have the date_join_court and date_terminated meets the required conditions.
    -I wonder, is it possible to enumerate all types of event, then monthly for each event type with the total as
      EVENT_TYPE                                         MONTH             MONTHLY_EVENTS_PER_EVENT_TYPE
    -------------------------------------------------- ----------------- -----------------------------
    A very long long name                              Aug 2012                                      0 
    A very long long name                              Sep 2012                                      0 
    A very long long name                              Oct 2012                                      0 
    A very long long name                              Total                                           0 
    Absent without leave                               Aug 2012                                      0 
    Absent without leave                               Sep 2012                                      1 
    Absent without leave                               Oct 2012                                      1 
    Absent without leave                               Total                                         2 
    Court Appearance                                   Aug 2012                                      0 
    Court Appearance                                   Sep 2012                                      2 
    Court Appearance                                   Oct 2012                                      3 
    Court Appearance                                   Total                                         5 
    Incentive granted                                  Aug 2012                                      1 
    Incentive granted                                  Sep 2012                                      2 
    Incentive granted                                  Oct 2012                                      1 
    ......
    -I tried to use PARTTTION, but still, it does not produce the correct result,
    -Here's a version shortened the tables related to the query
    -Thank you very much in advance.
    --create lookup table for event type
     CREATE TABLE "LT_EVENT_TYPE" 
       ("E_ID" NUMBER, 
         "EVENT_TYPE" VARCHAR2(50 BYTE), 
         "DATE_CREATED" DATE, 
         "ACTIVE" NUMBER(2,0) DEFAULT 1
       ) 
    
     --create table court_engagement
      CREATE TABLE "COURT_ENGAGEMENT" 
       (     "ENGAGEMENT_ID" NUMBER, 
         "COURT_NAME" VARCHAR2(50 BYTE), 
         "DATE_REFERRED" DATE, 
         "DETERMINATION_HEARING_DATE" DATE, 
         "DATE_JOINED_COURT" DATE, 
         "DATE_TERMINATED" DATE, 
         "TERMINATION_TYPE" VARCHAR2(50 BYTE), 
         "DATE_CREATED" DATE, 
         "ACTIVE" NUMBER(2,0) DEFAULT 1, 
         "DEFENDANT_ID" NUMBER
       )
       --create table engagement_event
       CREATE TABLE "ENGAGEMENT_EVENT" 
       (     "EVENT_ID" NUMBER, 
         "E_ENG_ID" NUMBER, 
         "EVENT_TYPE" VARCHAR2(50 BYTE), 
         "START_DATE" DATE, 
         "END_DATE" DATE, 
         "RELATED_SERVICE_ID" NUMBER, 
         "DATE_CREATED" DATE, 
         "ACTIVE" NUMBER(2,0)
       )
    -------
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (9,'A very long long name',to_date('02/11/12','DD/MM/RR'),0);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (6,'Excellent performance',to_date('27/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (7,'Sanction imposed',to_date('27/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (8,'Incentive granted',to_date('27/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (2,'Police report',to_date('25/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (1,'Court Appearance',to_date('25/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (3,'Judicial direction',to_date('25/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (4,'Positive test',to_date('25/09/12','DD/MM/RR'),1);
    Insert into LT_EVENT_TYPE (E_ID,EVENT_TYPE,DATE_CREATED,ACTIVE) values (5,'Absent without leave',to_date('27/09/12','DD/MM/RR'),1);
    ----------
       
    REM INSERTING into COURT_ENGAGEMENT
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (13,'BBB',null,null,to_date('01/09/12','DD/MM/RR'),to_date('14/09/12','DD/MM/RR'),'Graduated',to_date('03/10/12','DD/MM/RR'),1,4);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (16,'BBB',null,null,to_date('15/09/12','DD/MM/RR'),to_date('07/11/12','DD/MM/RR'),'Did not Graduate',to_date('04/10/12','DD/MM/RR'),1,4);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (20,'AAA',null,null,to_date('07/10/12','DD/MM/RR'),null,'Did not Graduate',to_date('08/10/12','DD/MM/RR'),1,10);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (30,'BBB',null,null,to_date('04/09/12','DD/MM/RR'),null,null,to_date('05/11/12','DD/MM/RR'),1,19);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (21,'AAA',null,null,to_date('07/10/12','DD/MM/RR'),null,null,to_date('10/10/12','DD/MM/RR'),1,11);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (15,'AAA',null,null,to_date('02/10/12','DD/MM/RR'),null,null,to_date('03/10/12','DD/MM/RR'),1,3);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (23,'AAA',null,to_date('30/09/12','DD/MM/RR'),to_date('29/09/12','DD/MM/RR'),null,null,to_date('15/10/12','DD/MM/RR'),1,8);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (25,'AAA',null,to_date('10/10/12','DD/MM/RR'),to_date('20/09/12','DD/MM/RR'),null,null,to_date('18/10/12','DD/MM/RR'),1,15);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (27,'AAA',null,to_date('11/09/12','DD/MM/RR'),to_date('19/07/12','DD/MM/RR'),null,null,to_date('23/10/12','DD/MM/RR'),1,16);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (2,'BBB',to_date('01/10/12','DD/MM/RR'),to_date('01/10/12','DD/MM/RR'),to_date('29/09/12','DD/MM/RR'),null,'Did not Graduate',to_date('27/09/12','DD/MM/RR'),1,2);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (28,'AAA',null,to_date('03/10/12','DD/MM/RR'),to_date('01/10/12','DD/MM/RR'),null,null,to_date('24/10/12','DD/MM/RR'),1,17);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (17,'AAA',null,null,to_date('08/10/12','DD/MM/RR'),to_date('11/10/12','DD/MM/RR'),'Did not Graduate',to_date('04/10/12','DD/MM/RR'),1,6);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (18,'AAA',null,null,to_date('03/09/12','DD/MM/RR'),to_date('16/10/12','DD/MM/RR'),'Graduated',to_date('05/10/12','DD/MM/RR'),1,7);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (19,'BBB',null,null,to_date('01/10/12','DD/MM/RR'),to_date('09/10/12','DD/MM/RR'),'Graduated',to_date('05/10/12','DD/MM/RR'),1,9);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (22,'AAA',null,null,null,null,null,to_date('11/10/12','DD/MM/RR'),1,12);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (24,'AAA',to_date('08/10/12','DD/MM/RR'),to_date('01/10/12','DD/MM/RR'),to_date('04/10/11','DD/MM/RR'),null,'GangNam Style',to_date('17/10/12','DD/MM/RR'),1,14);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (26,'BBB',null,to_date('17/10/12','DD/MM/RR'),to_date('16/10/12','DD/MM/RR'),null,null,to_date('18/10/12','DD/MM/RR'),1,7);
    Insert into COURT_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TERMINATED,TERMINATION_TYPE,DATE_CREATED,ACTIVE,DEFENDANT_ID) values (29,'AAA',null,null,to_date('20/09/12','DD/MM/RR'),null,'GangNam Style',to_date('30/10/12','DD/MM/RR'),1,18);
    
    ---------------
    REM INSERTING into ENGAGEMENT_EVENT
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (8,18,'Incentive granted',to_date('01/10/12','DD/MM/RR'),null,null,to_date('05/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (21,2,'Police report',to_date('20/09/12','DD/MM/RR'),to_date('02/10/12','DD/MM/RR'),null,to_date('24/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (7,2,'Court Appearance',to_date('02/10/12','DD/MM/RR'),to_date('16/10/12','DD/MM/RR'),12,to_date('03/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (11,19,'Court Appearance',to_date('02/10/12','DD/MM/RR'),null,null,to_date('05/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (13,21,'Court Appearance',to_date('01/10/12','DD/MM/RR'),to_date('11/10/12','DD/MM/RR'),null,to_date('10/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (18,24,'Incentive granted',to_date('01/10/12','DD/MM/RR'),to_date('15/10/12','DD/MM/RR'),null,to_date('17/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (20,2,'Police report',to_date('16/09/12','DD/MM/RR'),to_date('18/09/12','DD/MM/RR'),10,to_date('23/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (24,17,'Court Appearance',to_date('16/10/12','DD/MM/RR'),null,null,to_date('25/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (26,30,'Judicial direction',to_date('01/10/12','DD/MM/RR'),null,null,to_date('06/11/12','DD/MM/RR'),0);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (9,2,'Court Appearance',to_date('01/09/12','DD/MM/RR'),to_date('15/09/12','DD/MM/RR'),10,to_date('05/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (12,20,'Judicial direction',to_date('07/10/12','DD/MM/RR'),null,null,to_date('08/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (17,24,'Sanction imposed',to_date('16/10/12','DD/MM/RR'),to_date('31/10/12','DD/MM/RR'),null,to_date('17/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (23,13,'Court Appearance',to_date('01/10/12','DD/MM/RR'),null,34,to_date('24/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (5,2,'Positive test',to_date('01/10/12','DD/MM/RR'),to_date('10/10/12','DD/MM/RR'),1,to_date('02/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (10,19,'Judicial direction',to_date('01/10/12','DD/MM/RR'),null,null,to_date('05/10/12','DD/MM/RR'),1);
    Insert into ENGAGEMENT_EVENT (EVENT_ID,E_ENG_ID,EVENT_TYPE,START_DATE,END_DATE,RELATED_SERVICE_ID,DATE_CREATED,ACTIVE) values (19,25,'Absent without leave',to_date('18/10/12','DD/MM/RR'),null,null,to_date('18/10/12','DD/MM/RR'),1);
    -Thanks for reading this.

    Ann

    Please give sample data and expected results.

    Hope below is what you'd expect - yet, I would like to ask a clarification - you have a filter 'where active = 1.
    And yet, you want these types in the output. I commented on this to my query filter.
    You can change accordingly

    WITH  all_months  AS
    (
       SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month
       ,      ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM  ) AS next_month
       from all_objects
       where
       rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1))
    )
    ,
    lt_event_type_a AS
    ( select event_type, which_month,next_month
      from lt_event_type, all_months
      --where active = 1
    )
    ,
    engagement_event_a as
    (SELECT * FROM engagement_event
     where active =1
     )
    
    select lt_ev.event_type,TO_CHAR (lt_ev.which_month, 'Mon YYYY')  AS month,
          count(ce.engagement_id) as monthly_events_per_event_type
      from engagement_event_a ev
      left outer join court_engagement ce on
       ( ev.e_eng_id = ce.engagement_id
            and ce.court_name like '%' )
      right outer join lt_event_type_a lt_ev   on
        (ce.date_joined_court <= LAST_DAY(lt_ev.which_month)
        and (ce.date_terminated is null or ce.date_terminated > LAST_DAY(lt_ev.which_month) )
        and lt_ev.event_type = ev.event_type
        )
     group by rollup(lt_ev.event_type, lt_ev.which_month)
     order by lt_ev.event_type, lt_ev.which_month ;
    
    EVENT_TYPE                                         MONTH    MONTHLY_EVENTS_PER_EVENT_TYPE
    -------------------------------------------------- -------- -----------------------------
    A very long long name                              Aug 2012                             0
    A very long long name                              Sep 2012                             0
    A very long long name                              Oct 2012                             0
    A very long long name                                                                   0
    Absent without leave                               Aug 2012                             0
    Absent without leave                               Sep 2012                             1
    Absent without leave                               Oct 2012                             1
    Absent without leave                                                                    2
    Court Appearance                                   Aug 2012                             0
    Court Appearance                                   Sep 2012                             2
    Court Appearance                                   Oct 2012                             3
    Court Appearance                                                                        5
    Excellent performance                              Aug 2012                             0
    Excellent performance                              Sep 2012                             0
    Excellent performance                              Oct 2012                             0
    Excellent performance                                                                   0
    Incentive granted                                  Aug 2012                             1
    Incentive granted                                  Sep 2012                             2
    Incentive granted                                  Oct 2012                             1
    Incentive granted                                                                       4
    Judicial direction                                 Aug 2012                             0
    Judicial direction                                 Sep 2012                             0
    Judicial direction                                 Oct 2012                             1
    Judicial direction                                                                      1
    Police report                                      Aug 2012                             0
    Police report                                      Sep 2012                             2
    Police report                                      Oct 2012                             2
    Police report                                                                           4
    Positive test                                      Aug 2012                             0
    Positive test                                      Sep 2012                             1
    Positive test                                      Oct 2012                             1
    Positive test                                                                           2
    Sanction imposed                                   Aug 2012                             1
    Sanction imposed                                   Sep 2012                             1
    Sanction imposed                                   Oct 2012                             1
    Sanction imposed                                                                        3
                                                                                           21 
    
     37 rows selected 
    
  • NEITHER 9213 working with 9174 DAQ for reading of temperature

    Hello

    I use NI 9213 and DAQ-9174 to monitor the temperature. Without thermocouple wire connected, using NOR-DAQmx tasks, reading is 2.296334 K. When I use DAQmx Read (Analog DBL 1Chan 1Samp) .vi, reading is 1377.69.

    1. What is the good?

    2. why reading is not taken into account the room temperature which is around 26?

    3. do I need to do the calibration for NI9213 before using it?

    Thank you

    Ott

    Hi Ott,

    If you do not have a thermocouple attached to the 9213 module, the module just go read electric noises. This electrical noise has no physical relationship to the room temperature. When you do actually connect the thermocouple, be sure to configure the DAQmx task as a task of thermocouple to HAVE. Also be sure to select the correct thermocouple specifications (i.e. type of thermocouple).

    Here is a good article giving measures by thermocouple.

    Here is the acquisition of data getting started guide.

    Hope this helps,

    Chris G

  • Oracle of the MAF error ' cannot read the DataControl uses on loadDataControl for the id:

    Need help!

    I created a simple SOAP web service for a remote database that works very well in 12 c WebLogic Server and also in the Jdeveloper HTTP Analyzer. When I use the same web service in the attached code, I get the following error (I've included output System.out.println in Ref. to the flow of the code) I use Jdeveloper 12 c MAF 2.0.0.0.41 on Mac OSx 10.9.

    Chk #0

    Processing line # 1

    Chk #1

    Chk #2

    [SEVERE - oracle.adfmf.framework - AmxBindingContext - loadDataControlById] Cannot read the DataControl uses on loadDataControl for the id: WLFNewActWS. [SEVERE - oracle.adfmf.framework - SynchronizationDC - syncDataFromOfflineToOnline] [Ljava.lang.StackTraceElement;@467c53d3

    @


    Sorry about that, I think I'm wrong you.

    OK, I created an example to test what goes wrong.

    1. server side, create a project named Employee_ws

    a. Department_ws.java

    public interface {Department_ws}

    public boolean addDepartment (a Department);

    }

    b. Department.java

    public class {Department

    public Department() {}

    Super();

    }

    int departmentId.

    String departmentName;

    locationId int;

    managerId int;

    {} public void setDepartmentId (int departmentId)

    this.departmentId = departmentId;

    }

    public int getDepartmentId() {}

    return departmentId.

    }

    {} public void setDepartmentName (String departmentName)

    this.departmentName = departmentName;

    }

    public String getDepartmentName() {}

    return departmentName;

    }

    {} public void setLocationId (int locationId)

    this.locationId = locationId;

    }

    public int getLocationId() {}

    return locationId.

    }

    {} public void setManagerId (managerId int)

    this.managerId = managerId;

    }

    public int getManagerId() {}

    return managerId;

    }

    }

    c. Department_impl.java

    @WebService

    / public class Department_impl implements Department_ws {}

    public Department_impl() {}

    Super();

    }

    @Override

    @WebMethod

    {} public boolean addDepartment (@WebParam (name = "arg0") a Department)

    If (Department! = null) {}

    int departmentId = department.getDepartmentId ();

    String departmentName = department.getDepartmentName ();

    int locationId = department.getLocationId ();

    managerId int = department.getManagerId ();

    Connection Conn;

    try {}

    Conn = ConnectionFactory.getConnection ();

    conn.setAutoCommit (true);

    Statement šment = conn.createStatement ();

    String inset_sql =

    "INSERT INTO dept (department_name, location_id, department_id, manager_id) VALUES ('+ '.

    departmentId + "," "" + departmentName + "'," + locationId + "," + managerId + ")";

    šment. Execute (inset_sql);

    Returns true;

    } catch (Exception e) {}

    System.out.println (e);

    }

    }

    Returns false;

    }

    }

    d. ConnectionFactory.java

    import java.sql.Connection;

    to import java.sql.DriverManager;

    import java.sql.SQLException;

    Connect to the database

    public class {ConnectionFactory

    public ConnectionFactory() {}

    Super();

    }

    protected static connection conn = null;

    public static connection getConnection() bird Exception {}

    If (conn == null) {}

    try {}

    String driver = "oracle.jdbc.driver.OracleDriver";

    String url = "jdbc:oracle:thin:@localhost:1521:orcl";

    User String = "employee";

    String password = "employee";

    Class.forName (driver);

    Conn = DriverManager.getConnection (url, user, password);

    } catch (SQLException e) {}

    System.Err.println (e.getMessage ());

    }

    }

    return conn;

    }

    public static {} Sub closeConnection()

    try {}

    If (conn! = null) {}

    Conn.Close ();

    Conn = null;

    }

    } catch (Exception ex) {}

    throw new RuntimeException (ex);

    }

    }

    }

    You can run Department_impl.java to start the Web service. i.e. http://127.0.0.1:7001 / Employee_ws-Client-context-root/Department_implPort? WSDL

    Server side sql:

    CREATE USER employee IDENTIFIED BY employee DEFAULT TABLESPACE users

    Temp TEMPORARY TABLESPACE

    Users WE QUOTA UNLIMITED;

    GRANT create employee to logon.

    GRANT alter used to logon.

    GRANT create any employee at table;

    GRANT create trigger employee TO;

    GRANT create any employee to view;

    GRANT create sequence employee TO;

    GRANT create synonym employee TO;

    GRANT create type employee TO;

    GRANT create employee to procedure;

    CREATE TABLE (DEPT

    DEPARTMENT_ID NUMBER (7, 0) NOT NULL,

    DEPARTMENT_NAME VARCHAR2 (50).

    NUMBER OF LOCATION_ID (7, 0),

    MANAGER_ID NUMBER (7.0)

    );

    2 create a mobile application of CRG named Dept

    a. Department.java (even for the server)

    b. SynchronizationDC.java

    import java.util.ArrayList;

    import java.util.List;

    Import oracle.adfmf.framework.api.AdfmfJavaUtilities;

    Import oracle.adfmf.framework.exception.AdfInvocationException;

    public class SynchronizationDC {}

    public SynchronizationDC() {}

    Super();

    }

    public void syncDataFromOfflineToOnline() {}

    It's just for testing, so I build Department manually instead of mobile db data, please replace in your business logic

    A Department = new Department();

    department.setDepartmentId (1);

    department.setDepartmentName("1");

    department.setLocationId (1);

    department.setManagerId (1);

    NamesList list = new ArrayList (1);

    List ParamsList = new ArrayList (1);

    List TypesList = new ArrayList (1);

    namesList.add ("arg0");

    paramsList.add (department);

    typesList.add (Department.class);

    try {}

    AdfmfJavaUtilities.invokeDataControlMethod ("Dept_WS", null, "addDepartment", namesList, paramsList,

    typesList);

    } catch (AdfInvocationException e) {}

    System.out.println (e);

    }

    }

    }

    c. new an AMX pag called Dept.amx

    "http://www.w3.org/2001/XMLSchema-instance" xmlns:amx ="http://xmlns.oracle.com/adf/mf/amx"

    xmlns:dvtm ="http://xmlns.oracle.com/adf/mf/amx/dvt" >. "

    Text = "syncDataFromOfflineToOnline."

    Disabled = "#{!}" Bindings.syncDataFromOfflineToOnline.Enabled}"id ="cb3"/ >

    d. deploy on Android Simulator

    Click the button and a new record have been db insert through the webservice, search the remote db recording

    If above does not solve your problem, please let me know, thanks.

    Byron

  • DPS: Judge to use the parameter Raster or vector in the States of the objects when the majority of the page is a photo. What is the best setting for the overall performance?

    I am trying to decide whether to use the parameter Raster or vector in the States of the object when the majority of the screen is a picture (with a modest but important legend for children to read). The legend certainly makes it look more net as vector. But does the photo! The raster setting seems to make the lower-res images in comparison. In my first edition of my application, I thought that raster would be the best setting when the photo was the subject dominating the page. But now, after seeing how strong he looks like vector, (but with almost a refresh of the unacceptable time. Perhaps better on the latest iPad. Most of my readers/students in class will use iPad 2 s, which has a slower processor). I wonder if I should go through the trouble of changing States of photo objects that have the type as well to the vector. It doesn't seem to be as sensitive to a re - draw on the iPad 2 (non-retine)

    Is Filesize hit if I make about 1200 on these objects range from Raster to vector? (It is a huge, highly interactive history book, so I'm curious if acutally go to vector on these photos would reduce the size of the file) What is the best setting for the overall performance?

    I see the freeks screen outside for a bit if you try to pinch and zoom in a vector object (photo) vs raster. Which is disappointing. Does slow down load time/refreshment in frame, which is a little less. I also found that the drop shadows really bad that redraws effect in vector, almost vibrating in a slide show, for example. Thus, in cases where I need shadows, I'm sticking with Raster.

    All tips go ahead?

    Brian

    Does that help? http://boblevine.us/Digital-Publishing-Suite-101-keep-text-sharp-in-raster-slideshows/

  • I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages for only one comand I need all four messages to display at the same time in VISA SERIES READ BUFFER

    I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages of single command given to this instrument... and I read messages through VISA series READ... during the race, the VI buffer displays the messages individually...  I need all four messages to display at the same time in VISA SERIES READ BUFFER, in order to find more than this block, I should add from the palette of function.

    Disable character of endpoint detection or make four readings where you concantanate simply the strings together.

  • I own CS 5Premium. Read the FAQ, it seems, I am eligible to proceed to 6 CS but I can't find the upgrade to purchase and download. I can't upgrade to CC because $49 per month, it's too much for me - do not use this product for the job. The offer of $29 se

    I own CS 5 Design Premium. Read the FAQ, it seems, I am eligible to proceed to 6 CS but I can't find the upgrade to purchase and download. I can't upgrade to CC because $49 per month, it's too much for me - do not use this product for the job. The offer of $29 seems reasonable but $49 is too much. I don't need most of the programs included in the CC, but subscribing to only three of them will cost much more. Really don't know what to do here :-(

    Buy CS6:
    ----------------------

    http://www.Adobe.com/products/catalog/CS6._sl_id-contentfilter_sl_catalog_sl_software_sl_c reativesuite6.html

    I believe that the offer of $29 is only for the first year, so you would end up paying $ 49 thereafter.

  • Changing the status of 'USER1' LED cDAQ9138/9 using c# / DAQmx

    I need to be able to change the State of the USER1 LED on a cDAQ9139 of my application code c# VS2010 chassis. Can someone point me in the direction of DAQmx class/property/method I should use?

    Thank you

    Malcolm Sharp

    Thanks for the reply. I think I'll be back with another method to indicate the operating status when using the cDAQ9138 as a system "headless"!

    Kind regards

    Malcolm Sharp

  • For the State Machine logic makes me Mad, ideas?

    Hello

    I am a complete newbie to Labview and up to the help of kind people on the forum and tutorials tips, State where I implement a state machine.  However, I can't it behave using logic.

    What I try to do is to test the relay using an automated test procedure.

    The procedure takes the following measures:

    1. a card reader and transistor NI9472 DO turns the relay power via the power of the coil (needs of the variable time period). (It's OK)

    2. account of how can cycles the relay contacts worked, it will easily exceed 100,000 cycles. (It's OK)

    3. every 10 cycles (new variables), the contacts are held closed, load circuit "15A in the state machine" (the current relay is switching, which will be 15 a at 30V) is turned off.

    4. While the State of 15A is off, I need to switch to 'State of 1' and the 'State of the measure' , that it allows the measure to take.

    5. Finally, the "State measure and the"State of A 1"must be turned off and the"15A State switched back on .

    6. this process continues for another 10 cycles and repeats.

    I tried to do by using the States and the logical selection function for different States, where she part works, it does not seem to flow completely.  I'm I missing logic.

    Hoping someone may be able to help, thanks

    Andy

    I really didn't thing you want to be returning this Boolean value in all States.  You should probably also have a different evolution register for each line of output.  Then you simply adjust those that you need to.

  • create a list or a container for the States of a statemachine

    Hello

    I'm working on an application where many different types of devices will be put into a test set-up for Board level testing.  Depending on the type of Board, I need to create an ordered list of all necessary tests for the device.  I have a state machine and a single State for each of the tests and try to figure out how to create a list of tests for the specific device.  I want to have control in each of the States to remove the first element of the list and then take the next value and he lead the shift register used to go from one State to the other.  This should allow the state machine switch to the appropriate State based on the type of device and its sequence of necessary test.

    It should be with a table?  Is there some containers easier to work with this use case?  I need a container that will allow me to easily add between 5 and 30 names of State (based on the needs of the unit type) and easily remove or increment a pointer to the next State in the container.

    Thank you

    Gary

    Hi Gary,.

    an array of string or "enum" comes to mind. You can use it for the selection of States.

    You have to transfer data?

    Another way would be a queue. You can read the States with the enqueue function.

    It may be useful

    Mike

  • Use of 'root' for the system volume is 100% and/dev/md0 is full

    Hello

    I recently started to receive notifications that the use of 'root' volume of my system is 100%

    I went through all the files and it seems that the culprit is/dev/md0

    I don't have any add-ons installed, and this NAS solution is specifically used as a backup to another NAS. It uses ReadyNAS Replicate for backups.

    Here is the output of df - h and df - i

    I tried commands like this:

    du - csh/var
    du - csh/var / *.

    And the problem doesn't seem to be in these directories. Very low use it.

    This error started appearing on the day that I got a copy no error of ReadyNAS Replicate that gave me an Exit Code: 11 (error e/s files)

    Can someone help me solve this problem?

    The reason why you could not find, was that at some point, your encrypted volume was not mounted (perhaps the USB is not was connected when you start the NAS server) and a repeated backup job is filled with the partition of the OS on the NAS.

    When you have looked at the system, the data volume has been mounted. There was data under/data on the partition of the OS, but could not say that.

    I passed on a summary of what has happened to our engineers and am waiting for their suggestion. However as it is a long weekend in the United States I don't expect an answer at least a few days.

  • The use of DAQmxWriteDigitalScalarU32 for write channels share the same ports?

    Hello

    I have a USB-6509 and NOR-DAQmx installed 15.5.1. Using the ANSI c api.

    Is it possible to create several independent channels that use different lines of the same port?

    DAQmxCreateTask("",&th1)

    DAQmxCreateDOChan(th1,"Dev1/line0:4","",DAQmx_Val_ChanForAllLines)

    DAQmxStartTask (th1)

    DAQmxCreateTask("",&th2)

    DAQmxCreateDOChan(th2,"Dev1/line5:9","",DAQmx_Val_ChanForAllLines)

    DAQmxStartTask (th2)

    ....

    and repeat for the following strings:

    Dev1 / line0:4
    Dev1 / line5:9
    Dev1 / line10:14
    Dev1 / line15:19
    Dev1 / line24:28
    Dev1 / line29:33

    So I can use DAQmxWriteDigitalScalarU32 to write to each task independently?

    for example:

    DAQmxWriteDigitalScalarU32 (th1, 1, 10, 0 x 1, NULL)

    DAQmxWriteDigitalScalarU32 (th2, 1, 10, 0 x 2, NULL)

    DAQmxWriteDigitalScalarU32 (th3, 1, 10, 0 x 3, NULL)

    ...

    DAQmxWriteDigitalScalarU32 (th6, 1, 10, 0 x 6, NULL)

    These tasks will interfere with each other because they use the same port, but are assigned different lines?

    If this isn't the case, I bits to the data, if the task/channel does not start at the Px.0 line?

    Thank you!

    Yes, as long as you use the same line on different channels, they must not interfere with each other for this reason, you can create a channel by line if you wish

    The reference to using the DAQmxWriteDigitalScalarU32 function:
    "A sample of the integer unsigned 32-bit unique, wrote to a task that contains a single digital output channel. "Use this format for devices with up to 32 lines per port.

    http://zone.NI.com/reference/en-XX/help/370471AC-01/daqmxcfunc/daqmxwritedigitalscalaru32/

    So yes, the DAQmxWriteDigitalScalarU32 can write on each task independently

  • Can I use an alias for parameter such as 'The value of parameter value VI' entry in the palette of models?

    I played with the example Veristand 2015 "Set model Parameters.vi.

    Is it possible to use a parameter alias as the input string to the function 'Set parameter 2D Array Values.vi'? I tried to do this, but get the following error:

    Error 307662 has occurred to define model Parameters.vi > NI_VS ModelManager ExecutionAPI.lvlib: NI VeriStand - Set parameter 2D Array Values.vi

    Possible reasons:

    NEITHER VeriStand: The node is not found in the system.
    =========================
    NOR VeriStand: Could not find expression of parameter

    I am convinced that the alias has been implemented in the system definition correctly.

    If not, what the point of having an alias for parameter? Model workspace calibration controls don't seem to be able to use them. Am I missing something?

    Thanks in advance for any help on this matter.

    The alias parameter access is just for reading.

    To write to the parameter, you ned to use control of Calibration of model or the model parameters Manager API. Alias as the parameter cannot be used to write.

  • Tips to remember when using the state machine in queue

    I was able to work through the convert my architecture of State Machine for a BAU, thus eliminating the use of nodes of property/local variables to send data values to my machine of the State, but rather to send through queues.

    I would like some advice/tips on taking to serve perfectly. Especially, "is not to make" things with queues and how to effectively release a queue, etc.. What is the convention when using queues? Thank you!

    V


  • How can I activate several tensions trigger on the PCI-6221 using NOR-DAQmx?

    I use the card to make an acquisition of data simple PCI-6221.  The idea is to allow three different analogue voltages trigger the State of data acquisition.  I currently put code in place for a trigger voltage but I'm not sure what to do to add two additional trigger voltages. Any ideas?

    Thank you.

    Hi capncane,

    The 6221 is not able to do an analog trigger so DAQmxCfgAnlgEdgeStartTrig will not work for your card. Is your relaxation a digital signal? If so what kind of logic level is? If it's TTL, you can use the PFI lines. If this isn't the case, you need to trigger as I mentioned in my previous post.

Maybe you are looking for

  • T520 - Bluetooth problem

    I have following the system, it is clearly said I "Broadcom Bluetooth 3.0 with antenna", but I don't see Bluetooth devic ein Manager devices under windows 7. You will appreciate all help to do the work of Bluetooth. Thank you 4239CTOThinkPad T520 - g

  • Don't size ListBox on front panel to show only an element

    I am sizing a ListBox control on my Fron Panel only display 1 point at a time. The smallest, I can do that is approximately 1 3/4 lines. ListBox is to display a list of customers, which only 1 can be selected. It will be complicated if more than 1 is

  • How to display image in sagittal, coronal and axial view in labview

    Hi guys Anyboday can help visualization of view sagittal, coronal and axial images. For example I have slices of the image I want to search in all the three plan, how to write the code for it. I would appreciate your help Thank you

  • OfficeJet 7310xi does not print duplex automatically after installing Windows 8.1

    When I bought my Officejet 7310xi and installed on my Windows XP desktop PC it worked fine print double-sided documents automatically. I recently bought a new desktop PC with Windows 8 and improved to 8.1 Windows and downloaded and installed the Offi

  • Music download

    How can I change the file format to play music on a mp3 player?