SQL Query for real time resource stats
Does anyone know what the query would be to duplicate the real time resource stats page in version 8 or above of UCCX? I need to build a custom web page that displays the same information. I've got all the connectivity to the database just fine and can query it and display information. Just can't figure out what the SQL would be that would extract that information.
Michael,
you can try :
SELECT x.resourceName, t.eventType, x.datetime FROM (SELECT t1.resourceID, t1.resourceName, MAX(t2.eventDateTime) AS datetime FROM Resource AS t1 INNER JOIN AgentStateDetail AS t2 ON t2.agentID = t1.resourceID GROUP BY t1.resourceID, t1.resourceName ) AS x INNER JOIN AgentStateDetail AS t ON t.agentID = x.resourceID AND t.eventDateTime = x.datetime ORDER BY x.resourceName
You will need to translate the eventType into the "readable" status like Talking or Not Ready with an IF or Case statement.
Regards,
Jeroen
Similar Messages
-
SQL query for date & time interval
Hello everyone,
there is my problem
I have to make a search for events that are taking place during inserted date & time .
There's the table structure:
event
datefrom
dateto
timefrom
timeto
The problem is, when I try:
select * from xyz where datefrom <= inserted_date and dateto >= inserted_date and timefrom <= inserted_time and timeto >= inserted time;
then I don't get back all records.
eg: user inserts date = 10.10.2010 and time 10:00 and in the table is event [abc 11:00 9.10.2010 -> 09:00 11.10.2010] stored following way:
event abdc
datefrom 09.10.2010
dateto 11.10.2010
timefrom 11:00
timeto 09:00
=> this event won't be found, because the sql logic compares only single parameters and not their context.
Do you have any idea, how to solve this issue?
Thank you.
LukasHello Hubert,
thank you very much for your proposal, but your code makes the same select as mine (but in a more user friendly look :).
Table:
datefrom 09.10.2010
dateto 11.10.2010
timefrom 11:00
timeto 09:00
Event date = 10.10.2010 and time 10:00.
Your query:
select * from xyz where 10.10.2010 between 09.10.2010 and 11.10.2010 (that's so far ok) and 10:00 between 11:00 and 9:00 (no return there, because 10:00 doesn't lie within interval 11:00 -> 9:00... actually no value lies there) ;
Don't you have any other idea?
Thank you
Lukas -
Hi All,
I have a table containing data like this
Person_name Time_spent Date/time
ABC 5.5 16-sep-10 12:00
ABC 3 16-sep-10 05:30
ABC 2.5 17-sep-10 12:00
ABC .5 16-sep-10 09:00
What I want is to get data like this
Person_name Time_spent Date/time
ABC 9 16-sep-10
ABC 2.5 17-sep-10
what query i should run?
Thanx
Omya query like this ...
select sum(time_spent), person_name, trunc(date_time) from <table_name>
group by person_name, trunc(date_time);
HTH. -
Error while executing a sql query for select
HI All,
ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
1. I dont want to increase the temp space
2. I need to tune the query, please provide your recomendations.
insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
(REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
select
REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
carrier_item_type,carried_item_protection_type,'PACS'
from
(select distinct
c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
a.carrier_item_type,a.carried_item_protection_type,'PACS'
from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
AND a.carrier_items=b.mux
and c.REPORTNUMBER=(case
when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
else 20
end)
and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
where not exists
(select *
from CST_DSA.HIERARCHY_MISMATCHES B where
A.REPORTNUMBER=B.REPORT_NUM and
A.REPORTTYPE=B.REPORT_TYPE and
A.REPORTDESCRIPTION=B.REPORT_DESC and
A.CARRIED_ITEMS=B.CARRIED_ITEMS and
A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
A.CARRIER_ITEMS=B.CARRIER_ITEMS and
A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
AND B.SOURCE_SYSTEM='PACS'
Explain Plan
==========
Plan
INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1
20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES
19 PX COORDINATOR
18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1
17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1
15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1
4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621
3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621
14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448
11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448
8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002
7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2
6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2
5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448
9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448
13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1
12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1
16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1 -
Problem writing a sql query for a select list based on a static LOV
Hi,
I have the following table...
VALIDATIONS
ID Number (PK)
APP_ID Number
REQUESTED Date
APPROVED Date
VALID_TIL Date
DEPT_ID Number (FK)
I have a search form with the following field item variables...
P11_DEPT_ID (select list based on dynamic LOV from depts table)
P11_VALID (select list based on static Yes/No LOV)
A report on the columns of the Validations table is shown based on the values in the search form. So far, my sql query for the report is...
SELECT v.APP_ID,
v.REQUESTED,
v.APPROVED,
v.VALID_TIL,
d.DEPT
FROM DEPTS d, VALIDATIONS v
WHERE d.DEPT_ID = v.DEPT_ID(+)
AND (d.DEPT_ID = :P11_DEPT_ID OR :P11_DEPT_ID = -1)
This query works so far. My problem is that I don't know how to do a search based on the P11_VALID item - if 'yes' is selected, then the VALID_TIL date is still valid. If 'no' is selected then the VALID_TIL date has passed.
Can anyone help me to extend my query to include this situation?
Thanks.Hello !
Let's have a look at my example:create table test
id number
,valid_til date
insert into test values( 1, sysdate-3 );
insert into test values( 2, sysdate-2 );
insert into test values( 3, sysdate-1 );
insert into test values( 4, sysdate );
insert into test values( 5, sysdate+1 );
insert into test values( 6, sysdate+2 );
commit;
select * from test;
def til=yes
select *
from test
where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
=decode('&til','yes',1,-1);
def til=no
select *
from test
where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
=decode('&til','yes',1,-1);
drop table test; It's working fine, I've tested it.
The above changes to my first idea I did because of time portion of the DATE datatype in Oracle and therefore the wrong result for today.
For understandings:
1.) TRUNC removes the time part of DATE
2.) The difference of to date-values is the number of days between.
3.) SIGN is the mathematical function and gives -1,0 or +1 according to an negative, zero or positiv argument.
4.) DECODE is like an IF.
Inspect your LOV for the returning values. According to my example they shoul be 'yes' and 'no'. If your values are different, you may have to modify the DECODE.
Good luck,
Heinz -
SQL Query Executing longer time
Hi , The below SQL query executing longer time . Please help to Improve the query performance. The query continuously running for more than 24 hours and failing with roolback segment error. Not getting the final output. Most of the tables are having milions of records.
Select distinct
IBS.ADSL_ACCESS_INFO,
IBS.LIJ ,
regexp_substr(OBVS.REFERENTIE_A,'[[:digit:]]+') as O_NUMBER,
DBS.CKR_NUMMER_CONTRACTANT,
DBS.DNUMBER
FROM CD.IBS,
CD.OIBL,
CD.IH,
CD.ODL,
CD.OH,
CD.DBS,
CD.OBVS
Where IBS.END_DT = To_Date('31129999', 'ddmmyyyy')
AND OIBL.END_DT = to_date('31129999', 'ddmmyyyy')
AND DBS.END_DT = to_date('31129999', 'ddmmyyyy')
AND OBVS.END_DT = to_date('31129999', 'ddmmyyyy')
AND OBVS.REFERENTIE_A LIKE 'OFM%'
AND OIBL.INFRA_KEY = IH.INFRA_KEY
AND OIBL.ORDERS_KEY = OH.ORDERS_KEY
AND IBS.INFH_ID = IH.INFH_ID
AND ODL.ORDH_ID = OH.ORDH_ID
AND DBS.DEBH_ID = ODL.DEBH_ID
AND OBVS.ORDH_ID = ODL.ORDH_ID
Order By IBS.LIJ
All the columns which are present in the where condition are having either Index/key (Primary/unique) except END_DT column.
Please AdvisePredicate pushing can help when it greatlly restricts the number of rows - you must experiment - might not work with all predicates pushed (as shown here)
select distinct
ibs.adsl_access_info,
ibs.lij,
obvs.o_number,
dbs.ckr_nummer_contractant,
dbs.dnumber
from (select infh_id,adsl_access_info,lij
from cd.ibs
where end_dt = to_date('31129999','ddmmyyyy')
) ibs,
(select infra_key,orders_key
from cd.oibl
where end_dt = to_date('31129999','ddmmyyyy')
) oibl,
(select ordh_id,regexp_substr(obvs.referentie_a,'[[:digit:]]+') as o_number
from cd.obvs
where end_dt = to_date('31129999','ddmmyyyy')
and referentie_a like 'OFM%'
) obvs,
(select debh_id,ckr_nummer_contractant,dnumber
from cd.dbs
where end_dt = to_date('31129999','ddmmyyyy')
) dbs,
cd.ih,
cd.odl,
cd.oh
where oibl.infra_key = ih.infra_key
and oibl.orders_key = oh.orders_key
and ibs.infh_id = ih.infh_id
and odl.ordh_id = oh.ordh_id
and dbs.debh_id = odl.debh_id
and obvs.ordh_id = odl.ordh_id
order by ibs.lijRegards
Etbin -
Defining Account Determination for Real-Time Integr
Dear all,
I haven't understood yet about Account determination for the real-time integration of Controlling (CO) with Financial Accounting (FI).
Please tell accounting process that use this account. And give me a detail example.
Thanks so much
MinhtbHello
This is the new feature in New GL accounting
During allocations in Controlling, most of the postings created do not affect Financial Accounting. These postings do not update any G/L account transaction figures; they are postings within Controlling. If, however, an allocation in Controlling leads to a change in the functional area or any other characteristic (such as Profit Center or Segment) that is relevant for evaluations in Financial Accounting, a shift occurs between the affected items in the profit and loss statement. For this reason, this information has to be transferred to Financial Accounting. This reconciliation between Controlling and Financial Accounting takes place by means of real-time integration.
As a result of real-time integration, all Controlling documents that are relevant for General Ledger Accounting are transferred from Controlling to General Ledger Accounting in real time. This means that Financial Accounting is always reconciled with Controlling.
A document is created in Financial Accounting for each posting in Controlling. This means that the detailed information contained in the CO documents is always available in reports in New General Ledger Accounting. This information can be sorted by the following, for example:
● Functional area
● Cost center
● Internal order
Real-time integration replaces the reconciliation postings from the reconciliation ledger. Consequently, you do not need a reconciliation ledger.
If, however, you do not set the Reconciliation Ledger Active indicator in Customizing for the controlling area, you cannot use the reports belonging to report groups 5A* (5AA1-5AW1). You set this indicator in Customizing for Controlling under General Controlling ® Organization ® Maintain Controlling Area. The reconciliation ledger serves as the data source for reports belonging to the report groups 5A*. You find these reports in the SAP Easy Access menu under Accounting ® Controlling ® Cost Element Accounting ® Information System ® Reports for Cost and Revenue Element Accounting.
Replacement reports are available as follows:
● You find the reports in the SAP Easy Access menu under Accounting ® Controlling ® Cost Element Accounting ® Information System ® Reports for Cost and Revenue Element Accounting (New).
● You can create additional reports in report group 5A21. You can assign the report group to any drilldown report of New General Ledger Accounting using the report-report interface.
● From the report Financial Statements Actual/Actual Comparison, you can call up the report Cost Elements: Breakdown by Company Code. You find the report Financial Statement: Actual/Actual Comparison in the SAP Easy Access menu under Accounting ® Financial Accounting ® General Ledger ® Information System ® General Ledger Reports (New) ® Balance Sheet/Profit and Loss Statement/Cash Flow ® General ® Actual/Actual Comparisons.
You can define account determination for each controlling area. You do this in Customizing for Financial Accounting (New) under Financial Accounting Global Settings (New) ® Ledgers ® Real-Time Integration of Controlling with Financial Accounting ® Account Determination for Real-Time Integration. In this way, you use the same account determination as for the reconciliation ledger (transaction OK17). You can then use the reconciliation ledger reports to compare FI balances with CO balances.
Prerequisites
If you use real-time integration in at least one company code, you need to have activated company code validation for the related controlling area. You do this in Customizing for Controlling under General Controlling ® Organization ® Maintain Controlling Area ® Activate Components/Control Indicators. Otherwise, the reconciliation between Financial Accounting and Controlling at company code level is not possible.
In Customizing for Financial Accounting (New), you have processed the IMG activities under Financial Accounting Global Settings (New) ® Ledgers ® Real-Time Integration of Controlling with Financial Accounting.
Activate real-time integration for all company codes between which you want to make CO-internal allocations.
In the IMG activity Define Variants for Real-Time Integration, do not select all CO line items for transfer. If the same line items are to be transferred as through the reconciliation posting from the reconciliation ledger, select the following line items:
● Cross-Company Code
● Cross-Business Area
● Cross-Functional Area
● Cross-Fund (if you use Public Sector Management)
● Cross-Grant (if you use Public Sector Management)
Features
Value flows within Controlling that are relevant for General Ledger Accounting such as assessments, distributions, confirmations, and CO-internal settlements are transferred immediately. The FI documents are posted with the business transaction COFI. They contain the number of the CO document. This means that you can call up the CO document from the FI document, and vice versa.
Activities
If a document could not be transferred because the posting period was blocked in Financial Accounting or no account was found, for example, the document is included in a postprocessing worklist. You need to check this worklist regularly and process any documents in it. From the SAP Easy Access menu, choose Accounting ® Financial Accounting ® General Ledger ® Corrections ®Post CO Documents to FI.
Example
An internal order for business area 0001 is settled to a cost center of business area 0002. The document from this allocation is transferred in real time to Financial Accounting.
Reg
assign points if useful -
How to create sql query for item master with operator LIKE with variables?
hi all,
How to create sql query for item master with
operator LIKE(Contains,Start With,End With) with variables using query generator in SAP B1 ?
JeyakanthanHi Jeyakanthan,
here is an example (put the like statement into the where field)
SELECT T0.CardCode, T0.CardName FROM OITM T0 WHERE T0.CardName Like '%%test%%'
The %% sign is a wildcard. If you need start with write 'test%%' and otherwise ends with '%%test'. For contains you need '%%test%%'. You also could combinate this statements like 'test%%abc%%'. This means starts with test and contains abc.
Regards Steffen -
OIM sql Query for getting the status of the task which got failed
Hi Everyone,
We have a requirement like we need to get the status of a particular task(say Create User in OID resource - Completed\Rejected status) for the particular user.We are able to get the status of the resource provisioed to the user but not the status of the particular task getting trigerred for the user.can someone put some light on this.We need to get the SQL query for this.
Thanks in Advance.
Regards,
MKNHi
Use this sample query to get the task status, also check the cooments
SELECT USR.USR_LOGIN, OSI.SCH_KEY,SCH.SCH_STATUS,STA.STA_BUCKET FROM
OSI,SCH,STA,MIL,TOS,PKG,OIU,USR,OBJ,OST
WHERE OSI.MIL_KEY=MIL.MIL_KEY
AND SCH.SCH_KEY=OSI.SCH_KEY
AND STA.STA_STATUS=SCH.SCH_STATUS
AND TOS.PKG_KEY=PKG.PKG_KEY
AND MIL.TOS_KEY=TOS.TOS_KEY
AND OIU.USR_KEY=USR.USR_KEY
AND OIU.OST_KEY=OST.OST_KEY
AND OST.OBJ_KEY=OBJ.OBJ_KEY
AND OSI.ORC_KEY=OIU.ORC_KEY
AND OBJ.OBJ_NAME='AD User'
AND OST.OST_STATUS = 'Provisioning' -- filter accordinglly
AND STA.STA_BUCKET = 'Pending' -- filter accordinglly
AND PKG.PKG_NAME='AD User' -- filter accordinglly
AND MIL.MIL_NAME='System Validation' ---- filter accordinglly
Thanks,
Kuldeep -
Extracting the Logical sql query for the specified report in OBIEE 11g
Hi ,
I want to extract the logical SQL Query for the Particular report in OBIEE 11.1.1.5.
Any pointers related to this will be very helpful.
Thanks,
Sonalifor a try please add Logical sql view to ur report it will dispaly the Logical sql for that Report..
Hope it will helps you. -
Oracle SQL query for getting specific special characters from a table
Hi all,
This is my table
Table Name- Table1
S.no Name
1 aaaaaaaa
2 a1234sgjghb
3 a@3$%jkhkjn
4 abcd-dfghjik
5 bbvxzckvbzxcv&^%#
6 ashgweqfg/gfjwgefj////
7 sdsaf$([]:'
8 <-fdsjgbdfsg
9 dfgfdgfd"uodf
10 aaaa bbbbz#$
11 cccc dddd-/mnm
The output has to be
S.no Name
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
It has to return "Name" column which is having special characters,whereas some special chars like -, / ," and space are acceptable.
The Oracle query has to print columns having special characters excluding -,/," and space
Can anyone help me to get a SQL query for the above.
Thanks in advance.You can achieve it in multiple ways. Here are few.
SQL> with t
2 as
3 (
4 select 1 id, 'aaaaaaaa' name from dual union all
5 select 2 id, 'a1234sgjghb' name from dual union all
6 select 3 id, 'a@3$%jkhkjn' name from dual union all
7 select 4 id, 'abcd-dfghjik' name from dual union all
8 select 5 id, 'bbvxzckvbzxcv&^%#' name from dual union all
9 select 6 id, 'ashgweqfg/gfjwgefj////' name from dual union all
10 select 7 id, 'sdsaf$([]:''' name from dual union all
11 select 8 id, '<-fdsjgbdfsg' name from dual union all
12 select 9 id, 'dfgfdgfd"uodf' name from dual union all
13 select 10 id, 'aaaa bbbbz#$' name from dual union all
14 select 11 id, 'cccc dddd-/mnm' name from dual
15 )
16 select *
17 from t
18 where regexp_like(translate(name,'a-/" ','a'), '[^[:alnum:]]');
ID NAME
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
SQL> with t
2 as
3 (
4 select 1 id, 'aaaaaaaa' name from dual union all
5 select 2 id, 'a1234sgjghb' name from dual union all
6 select 3 id, 'a@3$%jkhkjn' name from dual union all
7 select 4 id, 'abcd-dfghjik' name from dual union all
8 select 5 id, 'bbvxzckvbzxcv&^%#' name from dual union all
9 select 6 id, 'ashgweqfg/gfjwgefj////' name from dual union all
10 select 7 id, 'sdsaf$([]:''' name from dual union all
11 select 8 id, '<-fdsjgbdfsg' name from dual union all
12 select 9 id, 'dfgfdgfd"uodf' name from dual union all
13 select 10 id, 'aaaa bbbbz#$' name from dual union all
14 select 11 id, 'cccc dddd-/mnm' name from dual
15 )
16 select *
17 from t
18 where translate
19 (
20 lower(translate(name,'a-/" ','a'))
21 , '.0123456789abcdefghijklmnopqrstuvwxyz'
22 , '.'
23 ) is not null;
ID NAME
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
SQL> -
Pxi 1042 configuration for Real-Time
I have purchased
PXI-1042
controller 8187
one module for data capturing.
I want to configure the said pxi for Real-Time purposes,
so what steps should I follow?
thanks
Abbas
Solved!
Go to Solution.The Real-Time Deployment License is different from the LabVIEW RT module.
When you purchase a PXI controller, part of what you are buying is the operating system that is installed on it. If you purchased the controller with Windows on it then you purchased the copy of Windows that came with it. Now that you want to put the real-time operating system on it, you need to purchase the license for it.
But that's all legal stuff.
And you are correct that there is a copy of the RTOS on the controller. But if your controller has its disk formatted as NTFS you will not be able to use it. The RTOS requires that the hard drive be FAT32.
If your controller is FAT32 then you can boot into BIOS (hit delete while booting), and select Real-Time in the Boot Configuration to make your controller boot into Real-Time.
If you controller is not FAT32 then you will need to format the controller first, using the disks I have previously mentioned.
Please let me know if you have any questions.
Justin Parker
National Instruments
Product Support Engineer -
MAX support of SNTP for Real-time controller​s
Hey everyone,
I have some PXI systems that allow me to enter a Time Server IP address directly into the MAX setup for the device but I have some other PXI chassis that don't. Does this have to do with the version of Real-time they are running? Can anyone tell me what version of RT and MAX started supporting Time Servers natively through MAX for real-time controllers?
Thanks,
CraigHi craige,
It looks like SNTP synchronization is not fully supported for PXI systems:
http://forums.ni.com/t5/LabVIEW/Configuring-PXI-8184-controller-to-synchronize-to-SNTP-server/td-p/1...
However, for CompactRIO, synchronization with SNTP servers began with LabVIEW Real-Time 8.6:
http://digital.ni.com/public.nsf/allkb/F2B057C72B537EA2862572D100646D43
The forum post I linked above does have some links to customer created examples relating to NTP and SNTP Time Servers.
Please note that those examples are both unsupported and a little bit on the older side.
Regards,
Joel I.
Applications Engineer
National Instruments -
FI CO Integation: Document type for real-time integration with FI not there
Dear Gurus,
This is the error message that I got and I am looking for a solution could anyone help me please.
I was doing simultaneous costing and doing Product Cost Collector reports.[KKBC_PKO]
This is IDES 6.00 ehancement package 4,
How do I define a document type for real-time integration with FI?
Message no. FAGL_COFI003
"Diagnosis: For CO documents to be transferred into Financial Accounting in company code 1000, -the system requires a document type".
How do I go about with this, need steps to resolve this please
Thank you
SaleemHi,
1. Check which variant is assigned to your company code '1000' using this IMG path
IMG->Financial Acctg (New)->Financial actg global settings (New) ->Real-Time integration of Controlling with Financial Actg ->Assign variants for Real-time Integration to Company codes.
2. Check if document type is assigned to the variant assigned to your Company code in this path:
IMG->Financial Acctg (New)->Financial actg global settings (New) ->Real-Time integration of Controlling with Financial Actg -> Define Variants for Real-Time Integration.
Hope this helps. -
Hi there,
I have developed an application to detect interrupts generated by a electronic card and act in consequence. The program has been developed in labview but it calls a dll; that was created with labwindows. The dll is programmed to open the visa communication, enable events and install the interrupt handler and when an interrupt is detected, it reads the value of the different registers of the card and returns it to labview to visualize them.
The problem is that when the program waits for an interrupt, a prompt appears with the message "Waiting for real-time target (RT PXI target) to respond" and the only option I have is to click on the button to disconnect from the pxi or just wait. If I wait and I generate an interrupt, the prompt disappears and the application visualize the data like it was expected.
To wait for the interrupt the following code has been programmed in the function:
while (flag == 0)
Sleep (1000);
When an interrupt occurs, the value of flag changes to 1 and the function continue without any problem. I am not really sure, but probably here is the problem and probably this is not the best way to wait for an interrupt because the sleep function suspends the thread for the configured time, but at least the computing load in the PXI is between 0% and 1%. I was wondering if somebody knows how to wait for an interrupt without "lost" the communication with the PXI and if there is a better way to do it.
Any answer will be welcome and thanks for them,
Jaime
Solved!
Go to Solution.Hello Naity,
First of all, in which thread runs the waiting process? Is it scheduled in another thread than the function setting the flag?
It scheduled in the same thread that I use to configure the communications and configure the card. Anyway, here is the pseudo code of the function interrupt that I programmed under labwindows,.
char* interrupt(void)
1. Open visa communications
2.Install handler interrupt --> status = viInstallHandler (instr, VI_EVENT_PXI_INTR, IntrHandler, VI_NULL); // the function IntrHandler will be called when an interrupt occurs
3. Enable event PXI interrupt
4. Wait
while (flag == 0)
Sleep (1000);
5. Visualize the data coming from the interrupt (registers and values measured with the card)
6. Uninstall handler interrupt
7. Close visa session
The interrupt handler function IntrHandler is called immediately when an interrupt occurs and the pseudo code is like this
ViStatus _VI_FUNCH IntrHandler(ViSession instr, ViEventType etype, ViEvent event, ViAddr userhandle)
1. Disable some functions of the card to avoid damages.
2. Read registers and put them in a buffer
3. Change the value of flag ---> flag = 1;
In labview, I call the function interrupt with a call library function node (see the capture attached) and the program reads and saves the data from returned from the function.
Secondly, I am not sure this method is the most elegant. You could for example register an event with the function and, insteand of setting a flag to 1, trigger the event and schedule it in another thread (if the function is thread safe). This could reduce your CPU Load even more and seem a bit cleaner to me.
I've never used events before in labwindows but I will try to do it in this way. But anyway, I suppose that I should; somehow, wait the event to occurs in labview while the waiting for the event is programmed inside the dll...and probably the same prompt that i am trying to avoid is going to appear again, because I am not returning the "control" to labview (I mean, labview executes the dll and waits for the event to occur. Then the execution of the labview program is stopped in the call library function node executing the dll)
Third point, which environment of development are you using?
I am working with LV 2010 sp1 and Labwindows cv 10.0.1 and with the real time module.
I did also another test, I divided the program in different functions, one to initialize the communication, another to wait until a interrupt has been detected and the other to obtain the data from the interrupt and close communications. With labview I call first with the call library function node the function to initialize, later I call inside a while loop the wait function like this
int waitAseconds (double seconds, short stop_waiting)
if(flag==1 || stop_waiting == 1)
flag = 1; //to detect the stop_waiting button
printf("flagAA =1 stop waiting = %d time = %d\n", stop_waiting, clock());
return flag;
else
SleepUS(seconds*1000000);
//a++;
printf("flag a= %d stop waiting = %d time = %d\n", flag, stop_waiting, clock());
return flag;
and when the program detects an interrupt, the function returns to labview the flag and stops the loop. Finally, it reads the values and close communications.
In this way, the prompt appears but after running the application for 10 or 20 minutes and also i checked that there is a time gap between the executions in the loop.
Thanks for your reply and your help,
Jaime
Attachments:
capture.png 40 KB
Maybe you are looking for
-
"No Signal" from DVI on Viewsonic VA912b display
I'm trying to usu the DVI port on my Dual 1.8 G5 (10.3.9), but all I get is a few seconds of the Apple boot screen and then I lose the signal. My display works fine with the VGA adapter, but I'd prefer to use the DVI if possible. Any and all help wou
-
Jagged vector graphics from Illustrator in Indesign
Using CS3, Leopard, have all updates. I'm having problems with vector graphics created in Illustrator getting jagged when dragged from Illustrator to Indesign (or copied and pasted or placed as Illustrator file). They look jagged (stair stepped) in I
-
I downloaded an album that is supposed to offer the iTunes LP feature, but it's not working. I have nothing waiting to be downloaded from iTunes, and I have the most current version of iTunes. Any help with this?
-
I've made few changes to SMARTFORM in development and imported to quality. when I tried to display same form in quality, getting short dump with below message Error when importing object "T_NTOKENS" and the error is coming in standard FM SSF_READ_FOR
-
Can I receive notifications to 2 email addresses?
I have created a form using form central, I receive emails about responses to the email I registered with but can I add another email ?