Use of Impact Test with SW Trigger(DAQmx) vi

Hello,
I working on modal analysis (with hammer) and so I am trying to use Impact Test with SW Trigger(DAQmx) vi but I don't get signal of the acceleration (should be acquire as voltage), whereas I get the impact. And when I impact the beam I have an error message which says the sampling frequency should be more than 0.
thanks for your help

Hi,
Can you check the "physical channels (stimulus and response)" input to ensure that you have at least 2 signals? I get this error when I am selecting only one channel.
Hope this helps,
Charlotte F. | CLAD
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> "Du 11 octobre au 17 novembre, 2 sessions en parallèle : bien démarrer - approfondir vos connais...

Similar Messages

  • Using BPEL console testing with XML attributes

    I'm having trouble with using an XML attribute in my BPEL process. When I put an attribute on my input element, the BPEL Console test page no longer works. Here's what I'm doing:
    I create a synchronous new BPEL project in JDeveloper using the default input and output XSDs, and add a simple assign to assign the input to the output. When I deploy this and look at it in BPEL console, I can see the input field and enter my value to test.
    Now I go back into JDeveloper and add an attribute to the input element, and then redeploy my process. Now when I go into BPEL console, the Initiate tab no longer has any field for me to enter my value. Clicking the XML Source radio button doesn't help either. (I also tried invoking the BPEL process web service through the app server control - same issue.)
    I'm using JDeveloper 10.1.3.3 with App Server 10.1.3.3.0. Does anyone know how to make the BPEL Console testing work with XSDs that contain attributes?
    Thanks,
    Skip

    A bit more info on this. It doesn't appear that the problem is limited to the console tester. I created another BPEL process which calls my original process, and attempted to set the attribute on the input using the Assign activity. JDeveloper generated this:
    <assign name="Assign_1">
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:TestAttributes2ProcessRequest/client:input"/>
    <to variable="Invoke_1_process_InputVariable" part="payload"
    query="/ns1:TestAttributesProcessRequest/ns1:input"/>
    </copy>
    <copy>
    <from expression="'bob'"/>
    <to variable="Invoke_1_process_InputVariable" part="payload"
    query="/ns1:TestAttributesProcessRequest/ns1:input/@attribute1"/>
    </copy>
    </assign>
    As you can see this is mapping a variable into the /TestAttributesProcessRequest/input element and then attempting to set the attribute of that element to the value 'bob'. This compiles just fine but when this code is executed, this error occurs:
    Error in <assign> expression: <to> value is empty at line "87". The XPath expression : "" returns zero node, when applied to document shown below:
    oracle.xml.parser.v2.XMLElement@7efe7efe
    (Line 87 is query="/ns1:TestAttributesProcessRequest/ns1:input/@attribute1"/>)
    Is there something wrong with this generated code? Do I need to do some kind of custom code to set attributes, instead of using the graphical tools in JDeveloper?

  • Impact test force

    I am newbie in labviewprogramming. Then I have enquiries about my project which is using labview. I amusing impact test with NI DAQ 6251, impact hammer B&K 8200 andaccelerometer B&K 4371 then attach it in a structure. I have done somenecessary setting and it works. I can get some graphical result for magnitude (dbchecked) phase, coherence and others are works too.
    But, it is very important to meto get the value of the force when I hit the structure with the hammer. I shouldget this force value, to make the amplitude respond from accelerometer relativelycompared by the force. Can any one helpme what should I do with – especially – the labview program, so that it canresult in the force data. Then, how to get the value of the amplitude per force(m/N, in Y axis) versus the frequency (in x-axis) in a graph/chart. I really needyour help for my research.

    recommend that you refer to related discussion:
    http://forums.ni.com/ni/board/message?board.id=231&message.id=1258&requireLogin=False
    Doug
    NI Sound and Vibration

  • NI-DAQmx: Impact Test real-imagine plot

    Hello.
    I am a student of mechanical engineering and I am not familiar with signal proccessing. I have to use LABView for a measurement experiment. In that project I have to use an impact hammer and an accelerometer to test surfaces of some specific meterials. My teacher tell me that I have to take the real-imagine plot of undamaged pieces as a model so I can use them at future for model. My problem is that the code I had write or the one that I use form NI example (NI-DAQmx: Impact Test) returns me a messy plot no matter how many hits I made. My teacher said me that as many hits I do the plot will be more clear but he cannot figure out what goes wrong either cause he is not familiar with labview neiher.
    I wrote two different codes one using ready VI's and one that made the mathematic as my theory book say.
    Please help me cause I am in a dead-end and can't move on with that.
    I can post images from my codes or how I use the NI-DAQmx: Impact Test.
    Thank you!

    Hi Albert,
    An accelerometer is a type of sensor that is used to measure acceleration and output a corresponding voltage. Using Data Acquisition (DAQ) hardware, you can acquire the voltage from the accelerometer. However, most accelerometers will need  some form of current excitation, typically IEPE Excitation which is a widely used standard. You can view these sites for a discussion of Accelerometer Principles and Types of Accelerometers.
    Some DAQ cards are custom built to not only acquire the voltage but to supply the excitation current at the same time, specifically Dynamic Signal Acquisition (DSA) cards. An acceleration task is an instance of a DAQmx input task specially created for measuring accelerometers. You can programmatically configure the task in the LabVIEW or create the task in Measurement and Automation Explorer (MAX), as seen in this Knowledge Base. You will notice in the screenshot below, when configuring an acceleration task in MAX, you can supply values for the accelerometer's sensitivity, units, and the amount of current needed by the accelerometer. All of these values can be found in an accelerometer's specifications document. By entering these values, an acceleration task will allow you take the voltage measurements and scale them into g's or whatever unit your accelerometer measures.  This way you do not have to create a custom scale yourself.
    Hope this explanation helps.
    Regards,
    Mallori M.
    Mallori M
    National Instruments
    Global Customer Education Program Mananger
    Calculate the time you will save with NI Training
    Attachments:
    ScreenHunter_01 Dec. 02 21.42.PNG ‏39 KB

  • Use M-Series cards with DAQmx in Matlab!

    Hi DAQers!
    Who is this message for?
    For all people wanting to use their M-Series cards (and/or NI_CAQmx drivers) with Matlab.
    Content:
    Basic introduction into importing DAQmx into Matlab. Simple AI (analog input), advanced AI (synchronous)
    and simple AO solutions are displayed with Matlab source code.
    Motivation:
    There's probably little disagreement that the new M-Series cards are superior to the old E-Series cards.
    However, Matlab does (as of February 2005) not support either directly.
    By buying the Data Acquisition Toolbox you can access most of the E-Series' functions from within Matlab.
    But this will not help you with your new M-Series card! But it is possible to use M-Series cards with Matlab.
    First step
    Start by loading the NI dll:
    funclist = loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni')
    (You can choose any alias as long as it is a legal variable name.)
    If your version of Matlab is too old to provide the "loadlibrary" function directly, download it here:
    http://www.codeproject.com/dll/MatlabGenericDll.asp?df=100&forumid=26247&exp=0&select=972623
    After importing, you see the list of available functions.
    You can also display them by
    libfunctionsview('myni')
    That's basically it. By using the National Instruments NI-DAQmx C Reference manual and libfunctionsview('myni')
    you have access to those functions. One special thing you need to keep in mind is the fact that pointers
    work differently in Matlab than in C. This problem can be solved by using the Matlab function "libpointer".
    Sometimes Matlab does not require a pointer when C would. But I found that it does not hurt to
    specify a pointer in this case. Whether Matlab expects a pointer can be seen in the output
    created by libfunctionsview('myni')
    The general syntax for calling DAQmx functions is:
    [outputarguments]=calllib(alias,NIDAQmx_functionname,inputarguments)
    My next message will show a function I wrote that enables basic and advanced analoginput.
    Jens

    Hi!
    As promised, my Matlab function to use the M-Series card with Matlab.
    I have the bad habit of programming in German and English at the same time.
    I tried to correct that for this posting. I hope I succeeded!
    I wrote this function to suit my needs -which it does.
    Feel free to modify it to suit yours.
    Jens
    Edit: I just saw that my m-File is longer than 5000 characters! #duh#
    Sorry!
    I'll see if I can get a download up!
    Here's the abbreviated m-file without synchronous AI:
    function messmatrix=NImess(synchron,trigger,numofchans,samprate,samptime)
    funclist = loadlibrary('nicaiu.dll','nidaqmx.h','alias','myni');
    disp('NI: Create Tasks')
    taskh1=uint32(1);
    [a,b,taskh1] = calllib('myni','DAQmxCreateTask','master',taskh1)
    taskchans1=['Dev1/ai0:' num2str(numofchans-1)];
    [a,b,c,d] = calllib('myni','DAQmxCreateAIVoltageChan',uint32(taskh1),taskchans1,'',-1,-10,10,DAQmx_Val_Volts,'')
    nsample=samprate*samptime; %
    disp('NI: Config Sample Clock')
    [a,b]=calllib('myni','DAQmxCfgSampClkTiming',taskh1,'',samprate,DAQmx_Val_Rising,...
    DAQmx_Val_FiniteSamps,nsample)
    disp('NI: Config Digital edge start trigger')
    if trigger==1
    [a,b]=calllib('myni','DAQmxCfgDigEdgeStartTrig',taskh1,'/Dev1/PFI0',DAQmx_Val_Rising );
    else
    [a]=calllib('myni','DAQmxDisableStartTrig',taskh1)
    end
    disp('NI: Start task(s)')
    [a]=calllib('myni','DAQmxStartTask',taskh1)
    DAQmx_Val_GroupByScanNumber = 1;
    readarray1=ones(numofchans,nsample);
    readarray1_ptr=libpointer('doublePtr',readarray1);
    sampread=0;
    sampread_ptr=libpointer('int32Ptr',sampread);
    empty=[];
    empty_ptr=libpointer('uint32Ptr',empty);
    arraylength=nsample*numofchans; % more like "buffersize",
    disp('NI: Reading Data!')
    [a,readarray1,sampread,empty]=calllib('myni','DAQmxReadAnalogF64',taskh1,-1,-1,...
    DAQmx_Val_GroupByScanNumber,readarray1_ptr,arraylength,sampread_ptr,empty_ptr);
    disp('NI: Stop task')
    [a] = calllib('myni','DAQmxStopTask',taskh1);
    disp('NI: Clear task(s)')
    [a] = calllib('myni','DAQmxClearTask',taskh1);
    messmatrix=[readarray1'];
    disp('NImess finished')

  • HT204406 I am not able to download my files from iCloud to my iPad using iTunes Match, my internet connection is alive as I tested with Safari, I have enabled iTunes Match on and off to be usre is active..but still  cannot download....my music

    I am not able to download my files from iCloud to my iPad using iTunes Match, my internet connection is alive as I tested with Safari, I have enabled iTunes Match on and off to be usre is active..but still  cannot download....my music

    I have the same problem on my Windows 7 computer. In the right-click menu for a song one option is DELETE. However when I click that option the next window is to HIDE instead of DELETE. Apple, please help us with this.

  • Execution of Coded UI scripts with least possible test execution time in Windows7 Operating system using Visual Studio Test Agent 2010 without VS2010 installed

    Hi All,
    We are trying to execute coded UI scripts without Visual Studio installed. We are using “Visual Studio Test Agent 2010” for executing coded UI scripts without VS2010 in Windows 7, it is working fine. Also we verified executing the same script with VS2010
    Premium, it works fine as well.
    Here the challenge we are facing is with the Test execution time.
    When we run the coded UI script with IE11-Windows 7 OS-Visual Studio 2010 Premium it takes
    3min 36sec to complete the execution whereas with IE11-Windows 7 OS-Visual Studio Test Agent 2010  it takes
    6min 40sec for the same script to execute (which is almost double the time it takes while executing using VS2010).
    My question is what may be the reason for this difference? and how we can reduce the test execution time when running from Test Agent 2010?
    Kindly let us know what is the best practice to execute the coded UI scripts with least test execution time in Windows 7 Operating system using Visual Studio Test Agent 2010 without VS2010
    installed.
    Looking forward for your positive response.
    Thanks in advance..!!

    Tina-Shi, Thanks for the information.
    As you mentioned, we tried to execute the coded UI test using Mstest.exe in command on VS2010 Premium and checked on the execution
    time, there was a slight difference.
    Please find below execution time.
    Using Mstest.exe in command on VS2010 Premium/Win7 – 3.47 minutes
    Using VS2010 Premium/Win7 – 3.53 minutes
    Using Test Agent/Win7 – 7.3 minutes
    Also, I closed all the other processes in Task manager before starting up the execution.
    Still , I am facing the same Issue. Could you please suggest any other way to reduce the scripting time of coded UI script execution
    through Test agent 2010.
    Looking forward for your earliest response.

  • Trigger a program in ECC from BI using a process chain with out Program

    Hi,
    How can we trigger a program which is in ECC system from BI using a process chain with out writing any program.
    is it possible? if yes how can we achieve this.
    Thanks & Regards,
    Madhu

    Madhu,
    Not possible, indeed need event or Remote Function Call using an ABAP program.
    Other option would be to use a 3rd party tool like Control-M to run programs/jobs on whatever system in your landscape (but requires investments of course).
    Grtx
    Marco

  • Is it possible to start a PCI4472 and a PCI-MIO-16E-1 simultaneously using an analog trigger (with pre-trigger)?

    I would like to start several PCI 4472 and a PCI-MIO-16E-1 simultaneously. All boards are connected via a RTSI cable.
    My program works fine if I use software trigger, or an analog trigger from a PCI4472 channel. However, the analog trigger works only when I set pre-trigger (or pre-scan) to 0.
    Is it possible to start a PCI4472 and a PCI-MIO-16E-1 simultaneously using an analog trigger (with pre-trigger)?
    Thanks.
    Ian Ren

    Hi, Bill
    I think it is possible to set more than 38 pre-trigger scans on a single 4472 card. I've done this before. You can verify this by running the Labview example "Acquire N - Multi-Analog Hardware Trig.vi" which comes with LabView.
    What I try to do but without success/luck so far is to start data acquisitions of several 4472 cards and a PCI-MIO-16E-1 card using an anlog trigger (with pre-trigger).
    Thanks for your help.
    Ian

  • Using mac mini nearly for 3yrs. From few weeks i feel electric stock over it surface and on keyboard too. I Tested with current tester it showed electric flow

    Using mac mini nearly for 3yrs. From few weeks i feel electric stock over it surface and on keyboard too. I Tested with current tester it showed electric flow

    H.Kiran wrote:
    Thank First
    I just plug it to any plug in my house or my friend house before powering mac mini there is electric stock near power button
    I took it to apple care center strangely there i could't feel too much as in my house the service center guy recommend me to go with three pin power cable.
    I checked my house ground with technician everything is fine
    I have another system (Window pc) plugged to same ups no problem
    When i plugged my Apple keyboard to mac mini i feel electric stock but when plugged to pc no electeic stock & i tested it with electric tester
    I am asking what the result of testing it with the the tester was.

  • MTM Is possible make an exploration test with action recording on lab center machine (using hyper-v)?

    Hi everybody.
    I am getting crazy with Lab center. I cant record an exploration test if i try to make it on Lab center's remote machine.
    I have follow msdn help. And if i make it on local machine it works fine. 
    Test agent is configured correctly like "Interactive process".
    On lab center, my Lab status is "Ready".
    Connecting with lab center to target machine, Test Agent status is "Online" before run exploration test.
    While exploration test is running, Test Agent status is  "Running Tests".
    But when I make click on "Create Test case" there isn't any information of desktop click events from target machine.
    By other hand, when i finish there are attachments file with info from target machine. As you can see on  the flowing pick:
    And this make me come here to answers: Is possible make an exploration test with action recording on lab center machine (using hyper-v)? 

    Hi everybody.
    I am getting crazy with Lab center. I cant record an exploration test if i try to make it on Lab center's remote machine. I am using standard
    lab environment.
    I have follow msdn help. And if i make it on local machine it works fine. 
    Test agent is configured correctly like "Interactive process".
    On lab center, my Lab status is "Ready".
    Connecting with lab center to target machine, Test Agent status is "Online" before run exploration test.
    While exploration test is running, Test Agent status is  "Running Tests".
    But when I make click on "Create Test case" there isn't any information of desktop click events from target machine.
    By other hand, when i finish there are attachments file with info from target machine. As you can see on  the flowing pick:  
    (sorry i cant upload the pick until Microsoft verify my account)
    And this make me come here to answers: Is possible make an exploration test with action recording on lab center machine (using hyper-v)? 

  • JUnit 4.0+ - Using Parameterized test with external values

    Hi,
    I'm trying to use JUnit, but I want to control how the test case is executed using an external configuration file. I thought about using an Parameterized test class such as -
    @RunWith(Parameterized.class)
    public class SampleTest {
         private int x, y;
         @Test
         public void runSampleTest() {
              System.out.println("Running runSampleTest()");
           @Parameters
           public static LinkedList data() {
             LinkedList params = new LinkedList();
             params.add(new Integer[] { 1, 3 });
             return params;
    }However, I can only specify my parameter values from within the method data(). How can I configure this dynamically?
    Thanks,
    --John C.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    To further clarify. What I'm hoping to do is something like this (which is possible in JUnit 3.0+)
    TestSuite suite = new TestSuite();
    suite.add(new TestTest("testPassed"));
    suite.add(new TestTest("testFailed"));
    suite.add(new TestTest("testErrored"));
    // can't do this with the current TestCase in Junit
    // suite.add(new TestTest("testArgs", new Object[] { "ugly" }));
    return suite;I dynamically configure my test cases from outside of the Class.

  • [svn:bz-trunk] 19333: Rewrite these two tests with MXUnitManager instead of using tags.

    Revision: 19333
    Revision: 19333
    Author:   [email protected]
    Date:     2010-12-13 13:31:42 -0800 (Mon, 13 Dec 2010)
    Log Message:
    Rewrite these two tests with MXUnitManager instead of using tags.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/amf/in heritPropsTest.mxml
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/http/i nheritPropsTest.mxml

    Hi Stephan,
    this solved placing both animation on one page.  Make sure all your fonts are called out in the <head> section like for example:
    <script>var __adobewebfontsappname__="dreamweaver"</script>
    <script src="http://use.edgefonts.net/quicksand:n3,n4:default.js" type="text/javascript"></script>
    Dreamweaver does this automatic for you.  If you are having a font conflict I recommend under command  (if you are using dreamweaver)
    Clean up the font Tag and add only the ones that you are using again,  sometimes they accumulate.
    Good Luck.

  • How to judge correct rap in impact test

    Hi,guys
       I get a trouble during my impact test project.
       I use PCI-4472 and one module hammer connect to channel 0 and one accelerometer connect to channel 1.
       hammer as trigger of accelerometer to get impact response.
       My question is
       1) I need make sure the rap of hammer only once in each impact action. if yes, then record related response from accelerometer, if no, I need repeat impact action without record response. how can i check that?
       2) for this case, if I need average yet? ( I saw the SVXMPL_impact test(DAQmx).vi, it take some average computed for data, but for my application,since the impact only once each time, then if I can ignore the average function? I have few knowlegae about average theory.)
       3)how much samples I should use?
    Thanks for any help
    Tim

    To 1)
    How do you see a double rap?
    I assume you take a look at the hammer signal and look for more than one peak. Well do the same in LabVIEW. Hint:
    Waveform Peak Detection VI
    Owning Palette: Waveform Monitoring VIs
    Requires: Full Development System
    Finds the locations, amplitudes, and second derivatives of peaks
    and valleys in Signal In. Wire data to the Signal
    In input to determine the polymorphic instance to use or manually select the
    instance.
    This VI is similar to the Peak Detector VI.
    If you search the overall max or min with
    Waveform Min Max VI
    Owning Palette: Analog Waveform VIs and
    Functions
    Requires: Base Package
    Determines the maximum and minimum values and their associate time
    values for a waveform.
    you can determine a useful relative threshold.
    To 3)
    What is the lowest frequency you want to detect?  You should at least capture 1 period.  Together with pretrigger and windowing go for 2 periods
    What is the highest frequency you expect? For impact choose your sample rate at least 10x better 100x times higher. (Some say choose the highest you can get to avoid phaseshifts due to the aliasing filter)
    Both values will give you the number of samples.
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Who can help me with a trigger?

    Hi, I've got a little problem with my database that can be solved, or so I think, with a trigger. First of all, here it is.
    create table utente
    (id_utente number(5) Primary Key,
    nome varchar2(40),
    sexo varchar2(1) check (sexo='M' or sexo='F'),
    morada varchar2(60),
         data_nascimento date,
         contacto number(10),
         numero_BI number(9)
    create table servico
    (id_servico number(5) Primary Key,
         descricao varchar2(40),
         valor number(5),
         data_inicio date,
    data_fim date,
    check (data_fim>=data_inicio)
    create table modalidade
    (id_modalidade number(5) Primary Key,
         descricao varchar2(40),
         valor number(5)
    create table quarto
    (id_quarto number(5) Primary Key,
         descricao varchar2(40)
    create table inscricao_servico
    (id_inscricao_servico number(5) Primary Key,
         id_servico number(5) references servico(id_servico),
         id_utente number(5) references utente(id_utente),
         data_pagamento date
    create table inscricao_mod
    (id_inscricao_mod number(5) Primary Key,
         id_modalidade number(5) references modalidade(id_modalidade),
         id_utente number(5) references utente(id_utente),
         data_inscricao date,
         data_cessacao date,
    check (data_cessacao>data_inscricao)
    create table estadia
    (id_estadia number(5) Primary Key,
         id_utente number(5) references utente(id_utente),
         id_quarto number(5) references quarto(id_quarto),
         data_entrada date,
         data_saida date,
    check (data_saida>data_entrada)
    create table pag_mensalidade
         (id_pag_mensalidade number(5) Primary Key,
         id_inscricao_mod number(5) references inscricao_mod(id_inscricao_mod),
         mes_mensalidade number(6),
         data_pagamento date,
         unique (id_inscricao_mod,mes_mensalidade)
    insert into utente values (1, 'Manel', 'M', 'Rua grande', to_date('80.02.02','yy.mm.dd'), 123456789, 687654321);
    insert into utente values (2, 'Artur', 'M', 'Rua pequena', to_date('81.03.04', 'yy.mm.dd'), 223456789, 587654321);
    insert into utente values (3, 'Cardoso', 'M', 'Rua estreita', to_date('82.04.05', 'yy.mm.dd'), 323456789, 487654321);
    insert into utente values (4, 'Abílio', 'M', 'Rua larga', to_date('79.07.06', 'yy.mm.dd'), 423456789, 787654321);
    insert into utente values (5, 'Antunes', 'M', 'Rua nova', to_date('79.06.01', 'yy.mm.dd'), 423557982, 387654822);
    insert into modalidade values (1, 'Total', 800);
    insert into modalidade values (2, 'Diurno ate 18', 600);
    insert into modalidade values (3, 'Diurno ate 22', 700);
    insert into quarto values (1, '412');
    insert into quarto values (2, '413');
    insert into quarto values (3, '414');
    insert into quarto values (4, '415');
    insert into quarto values (5, '416');
    insert into servico values (1, 'Excursao a Fatima', 150, to_date('11.05.13', 'yy.mm.dd'), to_date('11.05.13', 'yy.mm.dd'));
    insert into servico values (2, 'Ida ao cinema', 10, to_date('11.08.22', 'yy.mm.dd'), to_date('11.08.22', 'yy.mm.dd'));
    insert into servico values (3, 'Apoio domiciliario', 100, to_date('11.07.01', 'yy.mm.dd'), to_date('11.07.31', 'yy.mm.dd'));
    insert into estadia values (1, 1, 1, to_date('11.05.05', 'yy.mm.dd'), null);
    insert into estadia values (2, 2, 2, to_date('10.01.02', 'yy.mm.dd'), null);
    insert into estadia values (3, 3, 3, to_date('09.12.15', 'yy.mm.dd'), to_date('10.02.25', 'yy.mm.dd'));
    insert into inscricao_mod values (1, 1, 1, to_date('09.12.15', 'yy.mm.dd'), null);
    insert into inscricao_mod values (2, 2, 2, to_date('11.11.11', 'yy.mm.dd'), null);
    insert into inscricao_mod values (3, 1, 3, to_date('10.04.10', 'yy.mm.dd'), to_date('11.09.21', 'yy.mm.dd'));
    insert into inscricao_servico values (1, 1, 1, null);
    insert into inscricao_servico values (2, 1, 2, to_date('11.10.01', 'yy.mm.dd'));
    insert into inscricao_servico values (3, 2, 4, null);
    insert into inscricao_servico values (4, 3, 5, to_date('10.12.12', 'yy.mm.dd'));
    insert into pag_mensalidade values (1, 1, 201110, to_date('11.10.23', 'yy.mm.dd'));
    insert into pag_mensalidade values (2, 2, 201111, to_date('11.11.27', 'yy.mm.dd'));
    insert into pag_mensalidade values (3, 3, 201112, NULL);
    insert into pag_mensalidade values (4, 1, 201111, NULL);
    drop table estadia;
    drop table inscricao_servico;
    drop table quarto;
    drop table pag_mensalidade;
    drop table inscricao_mod;
    drop table modalidade;
    drop table servico;
    drop table utente;
    Ok, the problem is: the table 'estadia' means 'stay' and 'quarto' means 'room'. I need to, before inserting on 'estadia', to check if that room is available or not.
    I may do this:
    insert into estadia values (4, 3, *3*, to_date('09.12.15', 'yy.mm.dd'), to_date('10.02.25', 'yy.mm.dd'));
    but if, after this command, i do this:
    insert into estadia values (5, 4, *3*, to_date('09.12.15', 'yy.mm.dd'), to_date('10.02.25', 'yy.mm.dd'));
    it accepts and it shouldn't, because I'm putting users 3 and 4 in the same room at the same time.
    the 3rd field is the room id and the next two fields are the entry date (data_entrada) and the exit date (data_saida). If a room is related to a specific stay in which the exit date hasn't gone by, that room shouldn't be available. Also, the exit date may be null, meaning that the exit date is unknown.
    I hope to have been clear about my question.
    Thanks, Chiapa

    This is a fairly easy business rule which can be implemented using triggers. Here goes.
    Tables (my version):
    drop table stay;
    drop table room;
    create table room
    (room_id     number not null primary key
    ,other_col     varchar2(10) not null)
    create table stay
    (stay_id     number not null primary key
    ,room_id     number not null references room(room_id)
    ,arrive          date not null check(trunc(arrive)=arrive)
    ,depart          date          check(trunc(depart)=depart)
    ,unique (room_id,arrive)
    ,check(arrive <= depart))
    /The rule you are trying to implement is this one:
    create or replace assertion no_overlap as
    check(not exists
            (select 'two overlapping stays for a room'
             from stay s1
                 ,stay s2
             where s1.room_id = s2.room_id
               and s1.stay_id != s2.stay_id
               and (s1.arrive between s2.arrive and nvl(s2.depart,s1.arrive) or
                    s1.depart between s2.arrive and nvl(s2.depart,s1.depart))
    /Sometime in a far far away future, we may be done now. That future has still to arrive though.
    So here's the trigger-code and supporting objects:
    create or replace procedure p_get_Lock(p_lockname    in varchar2) as
    pl_id number(38);
    pl_return number;
    pl_timeout number := 0;
    begin
      -- Go get a unique lockhandle for this lockname.
      pl_id := dbms_utility.get_hash_value(name      => p_lockname
                                          ,base      => 1
                                          ,hash_size => power(2,30));
      -- Request the application lock in X-mode.
      pl_return :=
      dbms_lock.request(id                => pl_id
                       ,lockmode          => dbms_lock.ssx_mode
                       ,timeout           => pl_timeout
                       ,release_on_commit => true);
      if pl_return not in (0,4)
      then
        raise_application_error(-20000,'Could not serialize for business rule.');
      end if;
    end;
    create global temporary table stay_te
    (room_id     number not null)
    create or replace trigger stay_aiur
    after insert or update on stay
    for each row
    begin
      if inserting or
         (updating and (:new.room_id != :old.room_id or
                        :new.arrive < :old.arrive or
                        :new.depart > :old.depart))
      then
        insert into stay_te(room_id) values(:new.room_id);
      end if;
    end;
    create or replace trigger stay_aius
    after insert or update on stay
    begin
      for r in (select distinct room_id
                from stay_te)
      loop
        p_get_lock(to_char(r.room_id));
        declare
          p_error varchar2(80);
        begin
          select 'Overlapping stays for room '||to_char(r.room_id)||'.'
          into p_error
          from dual
          where exists
            (select 'two overlapping stays for a room'
             from stay s1
                 ,stay s2
             where s1.room_id = s2.room_id
               and s1.room_id = r.room_id
               and s1.stay_id != s2.stay_id
               and (s1.arrive between s2.arrive and nvl(s2.depart,s1.arrive) or
                    s1.depart between s2.arrive and nvl(s2.depart,s1.depart))
          raise_application_error(-20000,p_error);
        exception when no_data_found then
          null;
        end;
      end loop;
      delete from stay_te;
    end;
    /Haven't tested it, but I think it's all okay.

Maybe you are looking for