Need help with LabVIEW code for motor control.

Hello

My name is Sasi. I'm a grad student BME working on my thesis topic of assessment for back pain spine implants. To do this, I'm building a test machine that would apply pure moments of a specimen of the spinal column. I use LabVIEW 8.5 to implement the control of a brushless AC servo motor. My requirement is

Step 1: Initialize the engine.
Step 2: Start moving it to a uniform to the right PLAN (this value of RPM too user can enter).
Step 3: while doing step 2; at the same time read the couple cell data (acquisition of data using Asst.). DAQ o/p is 0 v to 10 V; 0 v is 10 Nm n
10 v is + 10 Nm
Step 4: What torque reached + 10 Nm, i.e. 10 V, the engine stops.
Step 5: from the position where the motor stopped (IE not need to return to the initial position) start moving in the opposite direction to the same
Uniform rpm as in step 2 at the reading of data in the cells of the couple.
Step 6: once more what torque reached-10 Nm, i.e. 0 V, the engine should stop.
Step 7: Repeat "Step 2" to the "step 6' 3 times.
Step 8: Reset engine position.

So far, I managed to get the engine to move backward @ a desired vel, the accl, deceleration for 3 cycles before n n. I enclose my code. I have a problem inserting the code for reading DAQmx amidst all this. Can someone help me.

Thnks,

Sasi.

Hi Sonia,.

I took a quick glance to your problem and I think I have a solution for you.  I certainly agree with the suggestion of the use of parallel loops Lynn.  This will allow the portion DAQmx run uninhibited by the part of the motion, and vice versa.  In addition, you need only perform an iteration of the loop of the movement whenever the voltage level exceeds a threshold.  Thus, by performing an iteration on the code of movement in the same loop are you iterate over DAQmx code, you essentially waste processor.

I created a VI that should do what you are wanting.  I tested it on me and it works very well.  You have a tweak a few things to apply to your system (such as motion Council DAQmx and physical channel ID, etc.).  I used two parallel loops and event programming.  Basically, the loop of movement starts the engine turns at the specified speed.  Once the engine is running, he expects the DAQmx loop to tell him that the voltage value has crossed the threshold.  When the voltage value exceeds the maximum threshold (I put a value slightly less than 10 to jitter and saturation), the DAQmx loop indicates the loop of the motion that it may end its iteration.  The motion loop stops the motion, causes a reversal and repeats the motion.  Once the movement has begun, he expects the DAQmx loop once again to tell him that a threshold was held, but this time, it's looking for a minimum threshold.  I used "Occurrences" to implement the event programming in LabVIEW.

I've commented the code pretty thoroughly, so I hope that comments will answer all remaining questions.  The advantage of using programs that focus on the event for this is that you save time processor, and your movement is more closely synchronized with the DAQmx.  Instead of one iteration of the loop of movement as fast as you can, updates every hour, you just put in pause and wait for the other loop to tell you when to start up again.  Meanwhile, the processor doesn't have to worry about an iteration of this loop over and over again.  In addition, when the accident occurs, you catch him immediately, instead of having to wait until the next iteration.  Thus, you are more closely synchronized with the DAQmx code portion.

I hope this will help you.  Please report if you have any questions about the code or its implementation.  Good luck!


Tags: NI Software

Similar Questions

  • need help with the code for update of a record (conditional release)

    all together

    Published by: 871431 on July 9, 2011 18:30

    871431 wrote:
    Hello

    I am looking to update a table that contains documents approved & not homologous, for this combination date & funds it should allow the only recording not approved.

    what I did is check if the recording is U if the incoming value is not approved for this error of combination stimulus funds & date, but if I need to update this unlicensed recording error... so I need to update record, and trigger the error if try to insert another disc not approved.
    Hope I am clear...

    Not clear for me

    Help pls

    Please realize and understand that everyone here talks about SQL

    Please post DDL for table
    Please provide the sample/test data & then explain with the help of data from the trial itself said it that results should be & why

  • Need help with the code for drop-down selection, please!

    I'm falling out of scope with a drop of water in my form. My form is long, and certain areas are in Page 2. When I click on the "Customer hospitality event" drop-down list selection, the fields of P2 do not hide. Here is the code that I have on the menu drop-down:

    -form1. P1.meetDetails.meetType::exit :-(JavaScript, client).

    switch

    (this.rawValue)

    {

    " case" " Customer home ' :

    Header.PRESENCE = "visible";

    meetDetails.presence = "visible";

    meetDetailsaddl.presence = "visible";

    Form1. P2.rstatus.presence = 'hidden '.

    Form1. P2. Status.Presence = 'hidden '.

    breaking ;

    }

    Help, please!

    Thank you!

    I see that references to the P2 have no end of line separators (-).

    Form1. P2.rstatus.presence = 'hidden '.

    Form1. P2. Status.Presence = 'hidden '.

    The JavaScript runtime engine is perhaps unfortunate. Try to add them.

    Steve

  • Hi, I need help with installing updates for CS5

    Hi, I need help with the installation of the updates of CS5. I get the following message: some updates to installation failure. My product is already registered. Can someone help me, please?

    Erkan please download and apply updates directly from updates.

  • Need help with error code 0 x 80070424 and 0x6D9

    I need help please!  Spent an entire day trying to figure this even ONCE!  When I try to change my windows firewall settings I get error code 0 x 80070424.  I worked at it so long, I forgot when I get the error 0x6D9 code.  But here is my BIGGEST problem, my computer won't let me do DOWNLOADS at all.  I even checked to make sure that the downloads are enabled in my internet settings.

    Any help would be GREATLY appreciated!

    Hi LindaL5299,

    I, too, got the dreaded error codes and spent much too much time looking for and try to apply the patches on the right!  I hope that I am sharing will help you!

    Have you seen this particular thread? (if you have, my apologies.)

    MS Answers: "I keep on getting error 0x6d9 and 0 x 80070424 code."

    If this isn't the case, you can check it out.

    Watch more precisely for the reply by VIJAY B.

    As a Microsoft Engineer, Vijay must know a few things about these formidable error codes!

    I have summarized his answer for you here.

    METHOD 1:

    If you have installed, UNINSTALL McAfee Firewall;

    AND

    T urn WINDOWS firewall "'WE ' "

    To ensure that Firewall service Windows is activated:

    1.   Click on:                         Start
    2 (in the search box) type: service

    3.   Select:                             services
    4 right-click right on: Windows Firewall service

    5.   Click:                              Stop

    6 right-click AGAIN on: Windows Firewall service

    7.   Click:                              START

    METHOD 2:

    Online virus scanner by using the Microsoft Safety Scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    METHOD 3:

    Try to install the latest updates from Windows Updates
    http://Windows.Microsoft.com/en-us/Windows7/install-Windows-updates


    METHOD 4:

    Run it Microsoft FixIt! tool (in the following article to see if that helps)

    Diagnose and automatically fix problems of Windows Firewall service

    http://support.Microsoft.com/mats/windows_firewall_diagnostic/

    *************************************************************************************************************

    Keep this site in your 'Favorites', too!

    WINDOWS SEVEN FORUMS    An informative, resourceful AND Microsoft-recommended WIN7 users including Q & A community can save you hours on a Google search! I BOOKMARKED the site (and you could want, too!)

    *************************************************************************************************************

    Hope ONE of these methods is right for you, Linda!  I DO "feel your pain!

    As a company of independent workers, online "etailer", my time AND my livelihood depends totally my PC!  I spent many an hour (s) search on the error codes and try to find fixes.  So, I hope that what I have learned and have just shared can lend to fix your problem (s), also!

    FINGERS CROSSED!

    WendeeMcCee

    "The he Miss Fix - It [If I can!] ". "

    Empathetic to the woes to find fixes for those darn "error codes".

    I hope I can help IF I can, but

    I not an 'IT' pro!

  • Hello [need help with exit code 7]

    Hello, I am having trouble installing the Premiere Pro and After Effects, the download is canceled without reason and this cloud creative reports "installation-fault read more ' link in this:

    Exit code: 7
    Please see specific errors below for troubleshooting. For example, ERROR: DS003...
    -------------------------------------- Summary --------------------------------------

    -fatal error 1, 0 error (s)



    -Payload: Adobe first Pro CC 2015 9.0.0.0 {38C72D42-0672-43B1-9E05-E7631684F9A1}.

    FATAL: DS003: installation package is possibly corrupt. Download the installer again and try again. (Impossible to extract '2015\payloads\AdobePremierePro9AllTrial\Assets1_1.zip C:\Users\wilmar\AppData\Local\Temp\{3F3A1FCC-6F0C-419D-BAF9-6527D5BAC6FF}\PremierePro_9_ LS20\Adobe Premiere Pro CC' to ' C:\Program Files (x 86) \Common {38C72D42-0672-43B1-9E05-E7631684F9A1} ".) : Error 1392 O land or pasta esta corrompido e ilegivel.)

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


    Even if I restart the download is not finalized and have the same final repeatedly need help. The only software that has been installed has the Media Encoder, I didn't even want. Thanks I await a response

    [Title edited... MOD]

    you use the cc desktop app to install your adobe programs?

    If so, errors ' Exit Code: 6 "," Exit Code: 7 "|"» CS5, CS5.5

    If not, Download Adobe Creative Cloud apps | CC free trial Adobe

  • I need help with the code of php mailer

    I followed the instructions to make this announcement and I get an email but no inside information. No message, no who he comes, nothing. only the mailer 'shape' is received. I am new to DW, still using training wheels. can anyone help?

    Here's the code for the contact page:

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    "< html xmlns ="http://www.w3.org/1999/xhtml">".
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    < title > Untitled Document < /title >
    < / head >

    < body >
    < do action = "mailer.php" method = "post" > "

    Name: < br / > < input name = "test" type = "text" size = "32" / > < br / >
    E-mail: < br / > < input name = "email" type = "text" size = "32" / > < br / >
    Message: < br / > < textarea name = "message" rows = "10" cols = "40" > < / textarea > < br / >
    < input type = "submit" name = "submit" value = "Submit" / >
    < / make >
    < / body >
    < / html >

    code for mailer:

    <? PHP
    $to = "[email address removed by Moderator] ';
    $subject = "from my Web site";
    $headers = "from: Form Mailer ';
    $forward = 0; 0 = no redirect, redirection of 1 = 1
    $location = ""; If 1 then "yoursite.com".

    $date = date ("' 1, f js, y" ");
    $time = date (' h: i A ");

    $mgs = "this is the result of your feedback form. He received the $date $time.\n\n ";

    If ($_SERVER ['REQUEST_METHOD'] == 'POST') {}
    foreach ($_POST as $key = > $value) {}
    $mgs. = ucfirst ($key). » : «. $value. "\n";
    }
    }
    else {}
    foreach ($_GET as $key = > $value) {}
    $mgs. = ucfirst ($key). » : «. $value. » \n » ;
    }
    }
    mail ($à, $subject, $msg, $headers);
    If ($forward == 1) {}
    Header ("' Location: $location '");
    }
    else {}
    echo "thank you for your visit. We will review your information that has been sent to us. Be blessed! « ;
    }

    ? >

    [Proposed by the correct forum Moderator]

    The problem really has nothing to do with Dreamweaver, but your lack of experience with PHP.

    For example, you have this line of code:

    $date = date ("1,f js,y");
    

    If you use echo to display the output of the $date, what you get is this:

    1,f 1257,09
    

    Not a very useful date, I think you would agree.

    What should be your code is the following:

    $date = date ("l, F jS, Y");
    

    Very similar, but completely different insofar as PHP is concerned. Note that the first character is lowercase L and not one. The other letters are also crucial.

    This code generates "Sunday, July 12, 2009.

    Now, why have you not no messages? Elementary, my dear Watson. Throughout your code, you assign to a variable called $mgs the message. When finally, you send the mail, the variable you are using is $msg. I suspect that $mgs should be $msg throughout. As humans, we can identify the misspelling and may ignore it. The computers cannot. You must be very attentive to the spelling when you work with a language like PHP.

  • need help with the code "meter."

    Hi I had this form of testing that executes_query on the new block instance.
    See the image below:

    http://i95.photobucket.com/albums/l133/element81/screenies.jpg
    [http://i95.photobucket.com/albums/l133/element81/screenies.jpg]

    I have this code on the button (next question) that captures the selected answer and compare it to the correct answer and then move to the next record:

    "If: blk_exam.radio_group76 =: blk_exam.answer_id then.
    -message('correct');
    -other
    -message('wrong');
    : blk_exam.score: =: blk_exam.score + 1;
    end if;
    next_record;
    "

    the problem is I want to create a score counter, but I do not know how to display it in the text (circled in blue) element.

    p.s. I'll hide the score counter, hurt later use it to record the score in the database.


    Ty in advance

    Hello
    No, there are no gaps. In fact, there is error in your code.

    Scenario 1:
    If the blk_exam is on the top of blk_score when I run the blk_exam form works with execute_query but the text of the note element is a bit turn off so I have to click on to a grey, she and her show '0' because of its first value 0 then walla pressing "next question" with my codes work... it increments...

    For this scenario, you use NVL then it will work as...

    :NON_DB_BLOCK.SCORE_FLD:=NVL(:NON_DB_BLOCK.SCORE_FLD,0)+1;
    

    Scenario 2:
    If I make blk_score on top of my blk_exam the text of the note element contains the value 0, but the test module does not work still... I had to click on any text element or anywhere on the form first seized execute_query and shows the question and choices... but then after that, it works well...

    So now don't need to keep the DB NO BLOCK on top just keep the issue/block on top. Normal then run query which is now to work it will work.

    hope you can imagine the two scenario hehe...

    Hope you can imagine the fault encoding ;)

    -Clément

  • Access platform Thorlabs APT with a joystick for motor control TDC001

    Hi I am trying to use a joystick 3 axes for control TDC001 XYZ configuration engine controllers from Active-X and APT Thorlabs platform in Labview. I already follow this link: http://www.thorlabs.com/images/TabImages/GuideToLabVIEWandAPT.pdf

    I'm able to control an axis in Labview platform APT now. Anyonw knows how can I access APT with my joystic 3 axes (either Labview or APT User Interface), so that I can use it to control the motors controllers?  Thank you!

    You try to learn programming manual from the (not-so-bad, actually) LabVIEW, you reference in your message?  If so, it would be wise to find a LabVIEW guru and get to teach you the basics of the LabVIEW programming, including the importance of data flows (and how to serialize your code using error line) and good programming Style LabVIEW ("Lesson #1 - all the diagrams should fit on a single screen of laptop , and if it's not then break down the task into sub - VI. ("" "" Lesson #2 - all sub - VI and VI is in need of an icon and a Description ').

    You don't say what the problem is that you are experiencing.  Could I guess that it involves the three-axis Joystick?  There are Joystick support in LabVIEW, but it's a little dark and a little outside the usual way of handling equipment.

    Give us a better idea of what questions you have.

    BS

    Tracyfu wrote:

    Hi I am trying to use a joystick 3 axes for control TDC001 XYZ configuration engine controllers from Active-X and APT Thorlabs platform in Labview. I already follow this link: http://www.thorlabs.com/images/TabImages/GuideToLabVIEWandAPT.pdf

    I'm able to control an axis in Labview platform APT now. Anyonw knows how can I access APT with my joystic 3 axes (either Labview or APT User Interface), so that I can use it to control the motors controllers?  Thank you!

  • Need help with the code to add dates to form

    Hello fans forum

    I am new to make forms and understood how to auto add the date, but I need the shape to change the date for each copy made.

    For example, is today 08/06/2012 if I print 10 copies of the form it will display 10 pages from 08/06/2012 to 17/06/2012. If the code exists for this I would be very gratefull to one who helps, I also wouldn't mind if this is not possible for manually inputing start / end dates.

    Currently I have print 15-30 copies of the form and hand write each of the dates but I get just to busy to do it. Also I can't print one a day, it must be in batches.

    Thanks in advance.

    I think that you misunderstood my comment about the Console window. Please see the Console window tutorial link in my previous answer. The Acrobat JavaScript Console window is internal to Acrobat, so there is no system restrictions that may prevent you from using it. It's a perfect place to run short automation scripts that do things like print separate copies.

    George also underscores a great solution, put the script in a (non-printable) button on the document itself. However, due to security restrictions this solution can be a bit tricky, but no more so than using the Console window. Each solution takes a little extra effort.

    The problem with having multiple pages, it's that you must manually create a document with pages already in it.  It is certainly a feasible solution, it comes you limit the number of pages that you have already created manually.  At least one solution AcroForm. If you re-create your form as a dynamic LiveCycle, then creating new pages on the fly is not a problem.

    None of these solutions will work fine, the real trick is to increment the date.

    Here's a short script that begins with today's date and adds a day for each iteration of the loop and then prints

    One day in milliseconds

    var nOneDay = 24 * 60 * 60 * 1000;

    var nToday = (new Date()) .getTime ();

    for (var i = 0; i)<>

    {

    oTheDate = new Date (nToday + i * nOneDay);

    Date format

    cTheDate = util.printd("mm/dd/yyyy",oTheDate);

    this.getField("MyDate").value = cTheDate;

    This.Print)

    }

    This same loop could be used to fill in a form on the page - multi (repeated) fields.

    Using the util.scand () function, this loop could be setup to start at an arbitrary date.

    See you soon,.

  • I need help with some Applescript for Postbox

    I was wondering if any of you can help me?

    I am writing a very simple script for my Postbox email application. It takes the selected message and turns it into a reminder. Everything works fine, but I want to take the subject assigned to the message and use it as the name of the callback list, and that's where it breaks down (topics are tags, as in Thunderbird and Mail).

    According to the dictionary, a message object counts among its subjects msg properties which is a list of subjects. According to the dictionary, a subject has three properties so, id, name , and color.

    I need only the first topic, so I do something like

    set theTopics to msg topics of theMessage.
    set theTopic to item 1 of theTopics

    no error reported, it returns a list, but when I then try to access the properties of the first article (= first subject), it is clear that something is wrong, and I think it's a bug/bad programming in the mailbox, but I'm not sure.

    When I do something like

    set ReminderList to name of theTopic

    He begins to complain. It is said that name (or id or color) is not available, as I can't get this to other classes, and it does not even return the class type for the element.

    It will return something that looks like this:

    class {show id "some topic"}

    no name for the class.

    And it seems that the text, but it behaves differently.

    How can I know what I'm actually deal with this object "topic"?

    What is - this actually to return?

    I don't know the app, but try to go back to theTopic properties.  That could make things a little clearer.

  • Need help with this code to update the user interface example

    I'm triying to understand the differences between the three methods to manage UI interactions.
    I'm really confused with these three terms when triying them figure out in a real case.
    Basically, I know that I should use invokeLater, invokeAndWat, or getEventLock() to avoid
    This exception: java.lang.illegalStateException: engine access UI without holding the lock on the event

    The code below illustrates the function of the invokeAndWait method, but if I replace it with
    invokeLater or getEventLock() the program will work exactly the same way.
    Could you please change the code to show the differences between the three
    methods of updating the user interface?

    / public final class HelloWorldMainScreen extends form {}

    private LabelField labelField;
    public HelloWorldMainScreen() {}
    labelField = new LabelField ("Hello World");
    Add (labelField);
    Thread MainScreenUpdaterThread = new MainScreenUpdaterThread (this);
    thread. Start();
    }

    {} public void appendLabelText (String text)
    labelField.setText(labelField.getText()+"\n"+text);
    }

    }

    SerializableAttribute public class MainScreenUpdaterThread extends Thread {}
    HelloWorldMainScreen screen;

    public MainScreenUpdaterThread (screen HelloWorldMainScreen) {}
    this.mainScreen = screen;
    }

    public void run() {}
    for (int i = 0; i)< 10;="" i++)="">
    try {}
    Thread.Sleep (5000);
    } catch (InterruptedException ex) {};
    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run() {}
    mainScreen.appendLabelText ("Update");
    }
    });

    }
    }
    }

    These three concepts are very confusing for a lot from people so all explanatory source code
    describing their functions will be highly useful for everyone, I think.

    Thanks in advance!

    With respect to the effect, there is no difference between methods.  The difference is the way in which the result is achieved.  So we can't change the code to show you the difference.

    As we are unable to demonstrate the difference, you have to do with an explanation.  To understand the explanation, you'll need to understand the thread of events, so if you have not already, please consider this:

    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

    If the three options are differentiated by the processing order:

    (a) invokeLater executes the update on the thread of events.  The transformation takes place at a later stage and the code which is in order after the invokeLater will actually run before the code within the invokeLater.

    (b) invokeAndWait also manages the update on the thread of events, which means that all other events that await on the thread of events will be run before this code.  But any code after the invokeAndWait will not be executed.

    (c) the synchronized option, like invokeAndWait, runs the update of the UI before moving on to the following code.  The difference is that the code to run on the event Thread is not executed before code in the synchronized block.

    If this is meaningless, so that probably does not matter too much.  in general, you should use invokeLater, except if you need to update the user interface occur in the order with your background processing.  If so, use invokeAndWait. It has synced are very few occasions where you must use the block, and it should be very small updates to the user interface and you should understand the implications this could have on the wire events.

  • Need help with the search for special characters in oracle text

    Hi all

    Oracle 11g sql developer 4.0 help

    I am facing this challenge where Oracle text when it comes to searching for text that contains a special character.

    What I've done so far with the help of http://www.orafaq.com/forum/t/162229/

    "CREATE TABLE"SOS" COMPANY ".

    (SELECT "COMPANY_ID" NUMBER (10,0) NOT NULL,)

    VARCHAR2 (50 BYTE) "COMPANY."

    VARCHAR2 (50 BYTE) "ADDRESS1"

    VARCHAR2 (10 BYTE) "ADDRESS2"

    VARCHAR2 (40 BYTE) 'CITY ',.

    VARCHAR2 (20 BYTE) 'STATE ', HE SAID.

    NUMBER (5.0) "ZIP".

    ) CREATION OF IMMEDIATE SEGMENT

    PCTFREE, PCTUSED, INITRANS 40 10 1 MAXTRANS 255 NOCOMPRESS SLAUGHTER

    STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)

    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS USER_TABLES DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT 1)

    TABLESPACE 'USERS ';

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (1, 'LSG SOLUTIONS LLC', null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (2,' LOVE "S TRAVEL', null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (3, 'DEVON ENERGY', null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (4, 'SONIC INC', null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (5, "MSCI", null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (6, 'ERNEST AND YOUNG', null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (7, "JOHN DEER", null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (8,'Properties@Oklahoma, LLC', null, null, null, null, null);

    Insert into COMPANY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (9, 'D.D.T L.L.C.', null, null, null, null, null);

    BEGIN

    CTX_DDL. CREATE_PREFERENCE ("your_lexer", "BASIC_LEXER");

    CTX_DDL. SET_ATTRIBUTE ("your_lexer", "' SKIPJOINS,"., @-"'); -to jump. , @ - ' symbols

    END;

    /

    CREATE INDEX my_index2 ON COMPANY (COMPANY_NAME)

    INDEXTYPE IS CTXSYS. CONTEXT IN PARALLEL

    PARAMETERS ("LEXER your_lexer");

    SELECT
    company_name
    FROM company
    WHERE CATSEARCH(company.COMPANY_NAME, 'LLC','') > 0
    ORDER BY company.COMPANY_ID;
    
    

    output

    company_name

    1 LSG SOLUTIONS LLC

    2 Properties@Oklahoma, LLC

    only 2 rows back but must return 3

    It helps if you post a copy and paste of effective enforcement of the full code, including the results.  You posted an index of context with the query with catsearch, which requires a ctxcat index.  You must be a context clue that you did not post and did not add your lexer to.  The following table shows it returns all the lines of 3 as planned using either a with catsearch ctxcat index or a context index with contains, as long that you include the lexer in your create index.  You must also be sure that the index is created, or synchronized after inserting or updating data.

    Scott@ORCL >-version:

    Scott@ORCL > SELECT banner version of v$.

    BANNER

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

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    CORE 11.2.0.1.0 Production

    AMT for 64-bit Windows: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    5 selected lines.

    Scott@ORCL >-table and the test data:

    Scott@ORCL > CREATE TABLE 'SOCIETY '.

    2 ("COMPANY_ID" NUMBER (10,0) NULL NOT ACTIVATE,)

    3 'COMPANY_NAME' VARCHAR2 (50 BYTE),

    VARCHAR2 (50 BYTE) 4 "ADDRESS1"

    5 "ADDRESS2" VARCHAR2 (10 BYTE),

    VARCHAR2 (40 BYTE) 6 'CITY',

    7 VARCHAR2 (20 BYTE) 'STATE ', HE SAID.

    NUMBER (5.0) 8 'ZIP '.

    (9) THE CREATION OF IMMEDIATE SEGMENT

    PCTFREE 10 10 PCTUSED 40 INITRANS, MAXTRANS NOCOMPRESS SLAUGHTER 1 255

    11 STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)

    12 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS USER_TABLES DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT 1)

    TABLESPACE 13 "USERS."

    Table created.

    Scott@ORCL > START

    2 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (1, 'LSG SOLUTIONS LLC', null, null, null, null, null);

    3 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (2,' LOVE "S TRAVEL', null, null, null, null, null);

    4 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (3, 'DEVON ENERGY', null, null, null, null, null);

    5 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (4, 'SONIC INC', null, null, null, null, null);

    6 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (5, "MSCI", null, null, null, null, null);

    7 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (6, 'ERNEST AND YOUNG', null, null, null, null, null);

    8 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (7, "JOHN DEER", null, null, null, null, null);

    9 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (8,'Properties@Oklahoma, LLC', null, null, null, null, null);

    10 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (9, 'D.D.T L.L.C.', null, null, null, null, null);

    11 END;

    12.

    PL/SQL procedure successfully completed.

    Scott@ORCL >-lexer:

    Scott@ORCL > START

    CTX_DDL 2. CREATE_PREFERENCE ("your_lexer", "BASIC_LEXER");

    CTX_DDL 3. SET_ATTRIBUTE ("your_lexer", "' SKIPJOINS,"., @-"'); -to jump. , @ - ' symbols

    4 END;

    5.

    PL/SQL procedure successfully completed.

    Scott@ORCL >-ctxcat index and using catsearch queries:

    Scott@ORCL > CREATE INDEX my_index2 ON COMPANY (COMPANY_NAME)

    2 INDEXTYPE IS CTXSYS. CTXCAT PARALLEL

    3 PARAMETERS ("LEXER your_lexer");

    The index is created.

    Scott@ORCL > SELECT

    2 company_name

    3 the COMPANY

    4. WHERE the CATSEARCH (company.COMPANY_NAME, 'LLC', ") > 0

    5 ORDER BY company.COMPANY_ID;

    COMPANY_NAME

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

    LSG SOLUTIONS LLC

    Properties@Oklahoma, LLC

    D.D.T L.L.C.

    3 selected lines.

    Scott@ORCL >-context and using the query index contains:

    Scott@ORCL > CREATE INDEX my_index3 ON COMPANY (COMPANY_NAME)

    2 INDEXTYPE IS CTXSYS. CONTEXT IN PARALLEL

    3 PARAMETERS ("LEXER your_lexer");

    The index is created.

    Scott@ORCL > SELECT

    2 company_name

    3 the COMPANY

    4 WHERE CONTAINS (company.COMPANY_NAME, 'LLC') > 0

    5 ORDER BY company.COMPANY_ID;

    COMPANY_NAME

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

    LSG SOLUTIONS LLC

    Properties@Oklahoma, LLC

    D.D.T L.L.C.

    3 selected lines.

  • Need help with instr/Regexp for the query

    Hi people of Oracle

    I use Oracle

    Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options

    I have a few responses from students and the valid values are + / / (alphabet) o/p and spaces at the end of the scam only not in the middle.

    According to my condition, the registration number 2 3.4 must be in the request but I'm alone (chart 3).

    Can we use REG_EXP

    Help, please.

    Thanks in advance.

    Rajesh

    with x as)
    (
    SELECT '+-+-POPPPPPP' STUDENT_RESPONSE, 1 numero_enregistrement FROM DUAL Union all the
    SELECT ' + --AOPPPPPP++' STUDENT_RESPONSE, 2 numero_enregistrement FROM DUAL Union all the
    SELECT "+-+-OPPPPPP -' STUDENT_RESPONSE, 3 numero_enregistrement FROM DUAL union all
    SELECT '+-+-9OPPPPPP' STUDENT_RESPONSE, 4 numero_enregistrement FROM DUAL)
    )
    (SELECT NUMERO_ENREGISTREMENT,
    TRIM (STUDENT_RESPONSE) X
    WHERE
    ((INSTR (UPPER (TRIM (STUDENT_RESPONSE)),'-') = 0))
    OR (INSTR (UPPER (TRIM (STUDENT_RESPONSE)), '+') = 0)
    OR (INSTR (UPPER (TRIM (STUDENT_RESPONSE)), 'O') = 0)
    OR (INSTR (UPPER (TRIM (STUDENT_RESPONSE)), 'P') = 0)
    OR (INSTR (UPPER (TRIM (STUDENT_RESPONSE)),' ')! = 0)
    )
    )

    Hi, Renon,

    Rb2000rb65 wrote:
    Hi people of Oracle

    I use Oracle

    Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options

    Thanks for posting this (and the WITH clause for sample data). It is very useful.

    I have a few responses from students and the valid values are + / / (alphabet) o/p and spaces at the end of the scam only not in the middle.

    You combine several qeustions responses in a single VARCHAR2 column? It would be better to have a separate line for each question.

    According to my condition, the registration number 2 3.4 must be in the request but I'm alone (chart 3).

    What exactly are your needs? You try to find the rows where the student_response contains one of the forbidden characters, or if it contains a space anywhere, but at the end of the string?

    Can we use REG_EXP

    Yes, but it's pretty easy and probably more effective, do not use regular expressions in this case:
    Here's one way:

    SELECT     record_number
    ,     student_response
    FROM     x
    WHERE     TRANSLATE ( UPPER ( RTRIM (student_response, ' '))
                , 'X+-OP'
                , 'X'
                )     IS NOT NULL
    ;
    

    In other words, once you remove the spaces and all occurrences of '+', '-', 'o' or 'P', then the forbidden characters are left, and you want to select the line, if there is one of these.

    If you really, really want to use a regular expression:

    SELECT     record_number
    ,     student_response
    FROM     x
    WHERE     REGEXP_LIKE ( RTRIM (student_response)
                  , '[^-+OP]'          -- or '[^+OP-]', but not '[^+-OP]'.  Discuss amongst yourselves
                  , 'i'
                  )
    ;
    

    but, again, it will be probably slower than the first solution, using TRANSLATE.

    Published by: Frank Kulash, October 17, 2011 13:05

    Published by: Frank Kulash, October 17, 2011 13:41
    What follows is a bit simpler that TRANSLATE:

    SELECT     record_number
    ,     student_response
    FROM     x
    WHERE     RTRIM ( UPPER ( RTRIM (student_response, ' '))
               , '+-OP'
               )          IS NOT NULL
    ;
    
  • Need help with the algorithm for my paint program

    I was doing a paint program with the help of a BufferedImage where the user draws to the BufferedImage and then I pull the BufferedImage class with that I extend JPanel. I want the user to be able to use a function of cancellation via ctrl + z and I also want them to update what type of paper, they write you on direct: a) b) graph paper c) double paper in white. I don't see how using BufferedImages. Is there something I'm missing, or should I do otherwise? I try to avoid the opposite effect because it seems too demanding on the computer, but if this is not feasible, then I guess I have to, but I think that I should ask you guys if what I do is logical or monstrous.

    What I intend to do, is make a LinkedList that has the following 4 parameters:
    (1) previous point
    (2) current point
    (3) current color
    (4) boolean connectPrevious

    This means that program essentially attracts the instant line using two points and the color specified in paintComponent(Graphics g). The Boolean value is ctrl + z (undo) purposes. I also intend to use a background thread to remove entries repeated in LinkedList except for the 25 latest LinkedList components (i.e. number could change in practice).

    What do you think guys?

    Any input would be greatly appreciated!
    Thanks in advance!

    Look at the package javax.swing.undo package - UndoableEdit interface and the UndoManager class.

    Everything to implement the interface. Store all the data necessary to perform your action (pixels, colours, forms etc.). Add all your UndoableEdits in an instance of the UndoManager class and call undo() redo() when you need it.

Maybe you are looking for