Get Position from 9512 Encoder in FPGA

Hello,
I am using the following Software/Hardware:
LV2010 with SoftMotion, Realtime, and FPGA modules
cRIO-9073 with NI 9512 Stepper Card and associated NI Drive
Misc Input and Output cards for digital signals
My application is essentially a conveyor capable of running up to 12.5 inches/sec with product spaced at approx 1.25" intervals.  I need to locate the parts on the conveyor using a trigger photoeye and then initiate different actions at different points of the conveyor as the product traverses down the conveyor.  The spacing between parts is variable.
This is my first RT/FPGA application but I have underwent the NI Training.  I was originally planning on using the RT controller in scan mode, but my initial testing shows this may not be fast enough.  I have written code to perform the following:
1. Activate Conveyor
Using Softmotion Function Blocks the RT controller starts the stepper motor and hence runs the conveyor.  I am currently testing the conveyor at two speeds to simulate real life conditions (Currently testing at 6 in/s and 12.5 in/s)
2. Capture Trigger Position
Capture the part location using a photoeye.  I am NOT currently using the position capture feature of the 9512.  Instead I have a loop looking for a rising edge of the trigger photoeye and then using the Softmotion Function Block to read the current position at that point.  I shift the position into an array to serve as a shift register.  To reduce jitter, I may eventually go to the hardware capture point on the 9512.
3. Inspect Part
I have another loop constantly evaluating the position of the belt using a Softmotion FB read and searching the array to see if the current position minus an offset amount (distance of device from trigger point) is in the array within a given tolerance.  For instance, say a part was seen on the conveyor after the belt has moved 1.000" from its initialization.  1.000" is shifted into the array from step #2 above.  A visual inspection of the part needs to occur at 10" from the photoeye.  The loop monitors the position of the belt and when the position of the belt is seen between 10.980 and 11.020", the inspection loop triggers the inspection and evaluates the results.  The results are updated in the shift register for the part evaluated.  As you can see, the jitter in the system requires a window and not an exact value.  Obviously, I want this window to be as small as possible.
4.  Divert Part
Based on the inspection results, the part is divereted off of the belt.  Another loop monitoring the conveyor position (using the Softmotion FB Read) is constantly inspecting the current position to see if the part is in the diverter position.  This loop functions exactly as Step #3 but the offset is different (15.000").  When the conveyor position is between 15.980" and 16.020", the diverter is activated if the part is bad.
5. Monitoring Loop
This is a test loop I have added to determine the jitter in the system and how much conveyor movement has occurred since the last scan.  Basically this loop uses the Softmotion Read FB and subtracts the previous iteration's position from the current iteration to determine the belt movement since the last scan.
ISSUES
I have all loops set to sync with scan engine and the scan engine running at the default 5mS.  With the conveyor moving at 6 in/sec, I am seeing the monitor loop show a conveyor movement of approx 0.031" between scans.  This indicates that the part moved 0.031" before the RT controller can respond to this.  Therefore, the position tolerance windows in steps 3 and 4 above have to be greater then 0.031" to see the part and react as it passes by the point on the conveyor.  In this instance it seems to be working, but occasionally, the distance traversed is much greater.  If that occurs, then parts can be missed.
When I run at 12.5 in/sec, I am seeing about double the distance traveled.  I need to minimize the position jitter on the system to insure that the part is as tightly controlled in location as possible.  If the part moves too much between scans, then my inspections might not be aligned with the part (ie. out of the vision FOV).  In my original research of the RT control system and discussions with NI technicians, I was under the impression that the scan engine would be running at 1kHz therefore, I could expect a position jitter of around 0.012".  Now that I have the hardware and am programming, I see that the recommended scan engine setting for Softmotion is 5ms.  That puts my position error around 0.060". 
Furthermore, I plan on adding more inspections and actions at different points of the conveyor prior to the divert.  Therefore, it is beneficial to reduce the amount of delay.  My fall back approach was to program the hardware with FPGA which should give very quick response and minimize the position error between scans.  However, now that I am programming, I cannot find a way to control the 9512 with FPGA or read the encoder of the 9512 with FPGA.
According to the NI C Series Module Compatibility Chart on the website, the NI 9512 is controllable from ScanEngine or FPGA.  I can create a project with FPGA and place the NI 9512 module under the FPGA portion, but there is no I/O or functions available for the module.  When adding a DIO card to the FPGA, Inputs and/or Output nodes are created.  Also, the Softmotion tools palette only has a couple of commands and none refer to the encoder. Am I overlooking something.
SPECIFIC QUESTIONS
1. How does one control the NI 9512 in FPGA.
2. How can the encoder count from the NI 9512 module be examined in FPGA.
3. Any insights on how to optimize the project or if it can be done in FPGA with the 9512 hardware.
My gut feeling is that I will have to abandon the Scan Engine approach and go straight FPGA, but I am struggling to find ways to control the 9512 with FPGA.
Thanks,
Rick

Hello Andy,
Thank you for the reply.  I have reviewed that document and cannot find anything specific about the NI 9512 Stepper Module.  I understand how to create a small FPGA project, but the problem I'm specifically having is that when I add the NI 9512 module under the FPGA target, I do not get any FPGA I/O available.  When I add the 9512 module to slot 3, I can see the module itself under the FPGA target, but there is not any FGPA I/O available under Mod3 (there isn't even a Mod3 folder created).  I have attached a JPG showing my project and the absence of any Module 3 I/O.
I cannot find a way to obtain the Enoder count from the 9512 module in FPGA.  I have searched for some examples on how to control this module in FPGA, but cannot find anything relevant.  Can you elaborate more specifically concerning the NI 9512 module in FPGA mode.
Thanks,
Rick
Attachments:
FPGA.jpg ‏35 KB

Similar Messages

  • How to get Position from EmployeeInfo in DIAPI

    I am using DIAPI(JCO) for SAP B1. According to one or my reuirement i am in need of Position from the EmployeesInfo. But there  seems no option or method for getting position from that. Can anyone guide me how to get that from EmployeesInfo ? Any help is appreciated..

    Looking at the DI API properties vs. DB fields mapping documentation in the SAP Business One developer area (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c5f5dbcc-0a01-0010-5d82-f25f2bee715e)
    it seems that this field is not exposed (yet).
    I.e. you could only run a SQL statement to get this information.
    Sorry,
    Frank

  • As3 get position from object in other object

    please i need help, i have a object inside this object i have other objects, (MC.Part1,MC.Part2,MC.Part3...etc), the MC rotate in the escene, that with interpolation, with the tools of flash,that is ok, the object parent rotate and the childs with he, but i want obtain the coordenate from the childs (MC1.Part1.x, MC1.Part1.y,MC1.Part1.z, etc), i try with trace(MC1.Part1.x), and always give me the same coordenate, i think is the coordenate in the parent, but i want the coordinate of the child when the parend is rotating.
    Please help me

    The coordinates of the child objects do not change relative to the parent that holds them if the parent is being moved, so they will report the same values all of the time.  If you want to know the location relative to the main stage, then you need to make use of the localToGlobal() method.  Try searching Google using terms like "AS3 localToGlobal tutorial" to get an explanation of how to use it.

  • Position, Velocity, Acceleration From Single Encoder, With TDMS Logging

    I'm still a fairly new user when it comes to Labview.  I started to feel comfortable enough to check out TDMS data logging and I'm kicking myself for not using it earlier.
    That said, I am currently reading angular position from an encoder, and estimating it's velocity and acceleration from the sampling rate & encoder resolution.  I'm using an FGV to do all the calculations and I've fine-tuned it to be as accurate as I would like.
    What I would like to do is implement TDMS logging that records position, calculated velocity and acceleration with the Log and Read option of TDMS.  I'd like these to be synchronized with the encoder reads, and I would like them to be handled by a single DAQmx Read vi.  As far as I can see though, you can only read the position information from the encoder.  I tried to drill down into the DAQmx Read.vi to create a modified version so that I could eploit the TDMS logging, but the subvi uses a call library function vi that currently is beyond my abilities. 
    I've been in MAX and I can't create any additional outputs for velocity and acceleration.  It seems like MAX takes enough information to create approximations from the sampling clock and resolution of the encoder.  Why doesn't it (or if it does, how do I implement it).

    What hardware are you using for reading the encoder? I have recently completed a similar project where the encoder was connected to a counter that was triggered by the counter increasing, so that it would only read on new positions, this worked reasonably well and seems like it should work well for your case.

  • I repeatedly get "error during rendering/encoding of menus/slideshow" message.  This process is the same on my iMac, MacBook and another iMac.  I have been burning dvd's int he same way for the past 12 months using the exact same steps successfully.

    I keep getting "error during rendering/encoding of menus/slideshows" message.  I have been burning DVD's in exactly the same way for the past 12 months and mostly on my MacBook which is 3 years old.  Obviously I'm using iDVD.  I purchased an iMac about a year ago and moved to use this for dvd burning without problem.  A few months ago (approximately) I started to experience problems with burning with the error message above.  I tried everything including starting the whole process from scratch right down to capturing the movie clips from my video recorder into iMovie, then using them in iDVD.  Still the same message came up.  I lost count of how many times I repeated the process with different clips and variations and the same thing happened.  This was also the case with my MacBook and my husband's iMac.
    After taking both of mymac's tothe service centre, having new optical thingys put it and even a new hard drive on my iMac along with a new DVD burner the same thing happened.  They told me it must be the process that I am using that is incorrect!
    I took my 27" iMac to an apple shop and asked them to assist me while I use the same technique as I always had.  The same message came up so they tried using my clips in one of their mac's.  The same message. They tried it with different clips and the same message.  The only way we could get theirs to work was with a magic DVD which did not produce what I needed and was limited with only one page. 
    I now cannot use any of my Mac's for the intended purpose that I bought them for - to produce good media for my work!  It was suggested that I purchase some non Mac software to burn DVDs which defeats the object of having a mac with iDVD in my opinion.  I have a book on iDVD which is very informative and have followed the process to the letter and checked all the trouble shooting and still no remedy.  It was mentioned that an up-date may have caused the problem on all my macs.
    I feel that this issue should be addressed by Apple as a matter of correctness.
    I now find that on the net there are many posts in forums and such like with exactly the same (almost word for word) problems.  Please Apple, keep/regain your good name and sort this out.
    Jayne Connelly

    Thanks Bengt W for your attention to this matter.  So much appreciated.  And thanks for putting me right on the aim of forums (new to this).  Although, you may regret asking for more information.  I've added everything I can below.
    The process I used is as follows:
    Import recorded clips of between 5 and 15minutes each from my video recorder into i
    Edit the clips (remove unwanted start and endng)
    Add title to front of clips
    ‘Share’ them to ‘movie’ (export using QuickTime)folder in .mov format individually
    Open iDVD and ‘create new project’
    Select ‘favourite’ theme that I have set up forall my work dvd’s (this has been used successfully many times and I’ve triedwithout using the favourite them).
    Add 2 submenus for each group of clips
    Select submenu  - drag and drop between 3 – 6 clips in each of the twosubmenus
    Change title colours on clips
    Dragand drop image into drop zones where required
    In‘map’ view I check for any yellow warnings before burning to disc
    In an attempt to remedy the problems I’ve tried the following:
    Try new DVD discs
    Try different themes (favourites and standardones)
    Change images in drop zones
    Start whole process again even from importingfrom camera again
    Two other completely different computers (iMacand MacBook) with iDVD
    Go to apple shop and use their computers to doin iDVD
    Try with one clip and no menu pages added
    Use a clip that I already have that did notoriginate from my camera
    Turn computer off and restart
    New hard drive
    New optical lense (thing)
    New DVD burner
    Saving to disc image rather than dvd disc
    Other points:
    I also have a ‘flip’ and ‘iPhone’ whereI’ve imported footage camera which, although limited, records and makes videoclips and burns them to DVD through iDVD without problem.
    For example, I have just gone through steps 5 - 11 using some clips that were already imported from my iphone to iPhoto and dragged across.  I used a theme that I've used before which has failed and added one sub menu page where the clip went.  It burned to disc image successfully.
    The startup disc, I believe will have no space issues asit’s a new hard drive with no use apart from this.  That could have been an issue before (I didn’t check it) butnot now.
    Other technical stuff that I don't understand but you may:
    I have…… Mac OS X Version 10.6.7 with all updates onit.  Processor 2.8 GHz Intel Corei7.  Memory 4GB 1067 MHz DDR3.
    iDVD version 7.1.1
    HardwareOverview:
      Model Name: iMac
      Model Identifier: iMac11,1
      Processor Name: Intel Core i7
      Processor Speed: 2.8 GHz
      Number Of Processors: 1
      Total Number Of Cores: 4
      L2 Cache (per core): 256 KB
      L3 Cache: 8 MB
      Memory: 4GB
      Processor Interconnect Speed: 4.8 GT/s
      Boot ROM Version: IM111.0034.B02
    SMC Version (system):            1.54f36
    OPTIARCDVD RW AD-5680H:
      Firmware Revision:     3AHB
      Interconnect:    ATAPI
      Burn Support:   Yes (AppleShipping Drive)
      Cache:    2048KB
      Reads DVD:    Yes
      CD-Write: -R, -RW
      DVD-Write:   -R, -R DL,-RW, +R, +R DL, +RW
      Write Strategies:  CD-TAO,CD-SAO, CD-Raw, DVD-DAO
      Media: Toshow the available burn speeds, insert a disc and choose View > Refresh
    If you can solve this you are better than the 'apple geeks' in the shop and the service technicians in the service centre (and of course me but that's no achievement). 
    Eagerly awaiting your reply.
    Jayne

  • Why am I getting ErrorCode: OperationNotSupported _Code: 204 When I am trying to get campaigns from sandbox account

    Hi All,
          Seasonal Greetings. 
          I am new one to bing ads . I am trying to get Campaigns from my sandbox account. The following is my code.                    
     <?php
    // To ensure that a cached WSDL is not being used,
    // disable WSDL caching.
    ini_set("soap.wsdl_cache_enabled", "0");
    try
        //$accountId = <youraccountid>; // Application-specific value.
         $accountId = "8951263";
        // Use either the sandbox or the production URI.
        // This example is for the sandbox URI.
        $URI =
            "https://api.sandbox.bingads.microsoft.com/Api/Advertiser/v8/";
        // The following commented-out line contains the production URI.
        //$URI = "https://adcenterapi.microsoft.com/api/advertiser/v8/";
        // The API namespace.
        $xmlns = "https://adcenter.microsoft.com/v8";
        // The proxy for the Campaign Management Web service.
        $campaignProxy = 
            $URI . "CampaignManagement/CampaignManagementService.svc?wsdl";
        // The name of the service operation that will be called.
        $action = "GetCampaignsByAccountId";
        // The user name, password, and developer token are
        // expected to be passed in as command-line
        // arguments.
        // $argv[0] is the PHP file name.
        // $argv[1] is the user name.
        // $argv[2] is the password.
        // $argv[3] is the developer token.
        if ($argc !=4)
            printf("Usage:\n");
            printf(
              "php file.php username password devtoken\n");
            exit(0);
        $username = $argv[1];
        $password = $argv[2];
        $developerToken = $argv[3];
        $applicationToken = "";
        // Create the SOAP headers.
        $headerApplicationToken = 
            new SoapHeader
                $xmlns,
                'ApplicationToken',
                $applicationToken,
                false
        $headerDeveloperToken = 
            new SoapHeader
                $xmlns,
                'DeveloperToken',
                $developerToken,
                false
        $headerUserName = 
            new SoapHeader
                $xmlns,
                'UserName',
                $username,
                false
        $headerPassword = 
            new SoapHeader
                $xmlns,
                'Password',
                $password,
                false
        $headerCustomerAccountId = 
            new SoapHeader
                $xmlns,
                'CustomerAccountId',
                $accountId,
                false
        // Create the SOAP input header array.
        $inputHeaders = array
            $headerApplicationToken,
            $headerDeveloperToken,
            $headerUserName,
            $headerPassword,
            $headerCustomerAccountId
        // Create the SOAP client.
        $opts = array('trace' => true);
        $client = new SOAPClient($campaignProxy, $opts); 
        // Specify the parameters for the SOAP call.
        $params = array
            'AccountId' => $accountId,
        // Execute the SOAP call.
        $result = $client->__soapCall
            $action,
            array( $action.'Request' => $params ),
            null,
            $inputHeaders,
            $outputHeaders
         print "Successful $action call.\n";
         print "TrackingId output from response header: "
              . $outputHeaders['TrackingId']
              . ".\n";
         // Insert a blank line to separate the text that follows.
         print "\n";
        // Retrieve the campaigns.
        if (isset(
            $result->Campaigns
            if (is_array($result->Campaigns->Campaign))
                // An array of campaigns has been returned.
                $obj = $result->Campaigns->Campaign;
            else
                // A single campaign has been returned.
                $obj = $result->Campaigns;
            // Display the campaigns.
            foreach ($obj as $campaign)
                print "Name          : " . $campaign->Name . "\n";
                print "Description   : " . $campaign->Description . "\n";
                print "MonthlyBudget : " . $campaign->MonthlyBudget . "\n";
                print "BudgetType    : " . $campaign->BudgetType . "\n";
                print "\n";
    catch (Exception $e)
        print "$action failed.\n";
        if (isset($e->detail->ApiFaultDetail))
          print "ApiFaultDetail exception encountered\n";
          print "Tracking ID: " . 
              $e->detail->ApiFaultDetail->TrackingId . "\n";
          // Process any operation errors.
          if (isset(
              $e->detail->ApiFaultDetail->OperationErrors->OperationError
              if (is_array(
                  $e->detail->ApiFaultDetail->OperationErrors->OperationError
                  // An array of operation errors has been returned.
                  $obj = $e->detail->ApiFaultDetail->OperationErrors->OperationError;
              else
                  // A single operation error has been returned.
                  $obj = $e->detail->ApiFaultDetail->OperationErrors;
              foreach ($obj as $operationError)
                  print "Operation error encountered:\n";
                  print "\tMessage: ". $operationError->Message . "\n"; 
                  print "\tDetails: ". $operationError->Details . "\n"; 
                  print "\tErrorCode: ". $operationError->ErrorCode . "\n"; 
                  print "\tCode: ". $operationError->Code . "\n"; 
          // Process any batch errors.
          if (isset(
              $e->detail->ApiFaultDetail->BatchErrors->BatchError
              if (is_array(
                  $e->detail->ApiFaultDetail->BatchErrors->BatchError
                  // An array of batch errors has been returned.
                  $obj = $e->detail->ApiFaultDetail->BatchErrors->BatchError;
              else
                  // A single batch error has been returned.
                  $obj = $e->detail->ApiFaultDetail->BatchErrors;
              foreach ($obj as $batchError)
                  print "Batch error encountered for array index " . $batchError->Index . ".\n";
                  print "\tMessage: ". $batchError->Message . "\n"; 
                  print "\tDetails: ". $batchError->Details . "\n"; 
                  print "\tErrorCode: ". $batchError->ErrorCode . "\n"; 
                  print "\tCode: ". $batchError->Code . "\n"; 
        if (isset($e->detail->AdApiFaultDetail))
          print "AdApiFaultDetail exception encountered\n";
          print "Tracking ID: " . 
              $e->detail->AdApiFaultDetail->TrackingId . "\n";
          // Process any operation errors.
          if (isset(
              $e->detail->AdApiFaultDetail->Errors
              if (is_array(
                  $e->detail->AdApiFaultDetail->Errors
                  // An array of errors has been returned.
                  $obj = $e->detail->AdApiFaultDetail->Errors;
              else
                  // A single error has been returned.
                  $obj = $e->detail->AdApiFaultDetail->Errors;
              foreach ($obj as $Error)
                  print "Error encountered:\n";
                  print "\tMessage: ". $Error->Message . "\n"; 
                  print "\tDetail: ". $Error->Detail . "\n"; 
                  print "\tErrorCode: ". $Error->ErrorCode . "\n"; 
                  print "\tCode: ". $Error->Code . "\n"; 
        // Display the fault code and the fault string.
        print $e->faultcode . " " . $e->faultstring . ".\n";
        // Output the last request.
        print "Last SOAP request:\n";
        print $client->__getLastRequest() . "\n";
    ?>
    http://msdn.microsoft.com/en-us/library/bing-ads-campaign-management-php-samples-get-campaigns(v=msads.80).aspx
    But I am getting responce 
    GetCampaignsByAccountId failed.
    ApiFaultDetail exception encountered
    Tracking ID: efa654c5-b112-4e96-8c3d-79bac7e70112
    Operation error encountered:
    Message: This operation is not supported.
    Details: 
    ErrorCode: OperationNotSupported
    Code: 204
    s:Server Invalid client data. Check the SOAP fault details for more information.
    Last SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adcenter.microsoft.com/v8"><SOAP-ENV:Header><ns1:ApplicationToken></ns1:ApplicationToken><ns1:DeveloperToken>BBD37VB98</ns1:DeveloperToken><ns1:UserName>-XXXXXX-</ns1:UserName><ns1:Password>-XXXXX-</ns1:Password><ns1:CustomerAccountId>8951263</ns1:CustomerAccountId></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>8951263</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Please Help me to get out of this .  
    Thank you in advance.
    Deepa Varma 

    Hello Nalin,
              Thank you for the reply . Now I am using
    $campaignProxy ="https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?wsdl" ;
    // The API namespace.
        $xmlns = "https://adcenter.microsoft.com/v9";
        $xmlns = "https://bingads.microsoft.com/AdIntelligence/v9";
    But I am getting 
    GetCampaignsByAccountId failed.
    AdApiFaultDetail exception encountered
    Tracking ID: ca31d743-7b7b-4479-8082-44997d60d549
    Error encountered:
    Message: Authentication failed. Either supplied credentials are invalid or the account is inactive
    Detail: 
    ErrorCode: InvalidCredentials
    Code: 105
    s:Server Invalid client data. Check the SOAP fault details for more information.
    Last SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9" xmlns:ns2="https://adcenter.microsoft.com/v8"><SOAP-ENV:Header><ns2:ApplicationToken></ns2:ApplicationToken><ns2:DeveloperToken>BBD37VB98</ns2:DeveloperToken><ns2:UserName>vbridgellp</ns2:UserName><ns2:Password>XXXX</ns2:Password><ns2:CustomerAccountId>8951263</ns2:CustomerAccountId></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>8951263</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    I am able to login to sand box UI and see my campaigns. What may be reason for the error ? 
    Thank you in Advance. 
    Deepa Varma

  • Problem getting video from firewire camera

    I've written a small app that gets video from camera and
    publishes it through FMS(2). It works well with any USB webcams I
    could find, but I have problems with firewire cameras. I can select
    the camera in Flash settings, and getCamera() returns the
    appropriate Camera object (e.g. it has the correct name, "Microsoft
    DV Camera", which is what's its name in Windows), but I get
    no/blank video.
    Code snippet:
    var myCam:Camera = Camera.getCamera();
    Alert.show("Using " + myCam.name);
    videoDisplay.attachCamera(myCam);
    The same code and the same camera seems to work on OS X. I've
    tried out two different firewire cameras on two different Windows
    (XP) machines, and they consistently didn't work. They do work in
    Flash Media Encoder (I'm not sure if it was written in Flash
    engine), or other programs that do capture in Windows; but my
    problem is that I need to inject metadata (stream.send()) into the
    stream so i can't just use FME :(
    Any ideas why this doesn't work? Do firewire cameras have
    issues with flash/flex (for the reference, I'm using Flex2/Flash9)
    on Windows XP, or am I doing something wrong here?
    Senko

    HI -
    MPEG Streamclip does not act as a connection device between your camera and Final Cut.
    It is a stand-alone application that converts the files from your camera into files that are useable in Final Cut.
    The reason Final Cut does not "see" your camera directly is that the files are not usable in Final Cut - as recorded by the camera. Those same files are seen and imported in iMovie because iMovie is designed to support a wide variety of consumer formats, and converts them automatically on import to a format the iMovie can use. FCE does not have this feature for .mpg movie files. But the format the iMovie converts to is one that is not optimal for FCE.
    Once you have converted the files that you want to use in MPEG Streamclip, you can store those converted files on your disk drive in a folder. Then open FCE an go to the menu File > Import > Files and navigate to where you have stored your converted files. Select them and the will be imported into FCE.
    It is preferable to import using the MPEG Streamclip method, because the files that iMovie makes, are borderline usable in FCE, and if possible, should be avoided.
    Hope this helps.
    MTD

  • Best way to get bytes from a ByteBuffer

    Hi,
    I see three possible ways to get the bytes from a ByteBuffer in a new byte array. (if I get the backed array, a change in that array will change the ByteBuffer, that's why I insist on new array).
    1. System.arraycopy on the backed array
    2. clone() on the backed array
    3. use ByteBuffer's get() method
    Which one is the best in terms of performance ?
    Thank you for any tips.

    This Java tip demonstrates a method of getting bytes from a ByteBuffer. A ByteBuffer has a capacity that determines how many bytes it contains. This capacity can never change. The bytes in a ByteBuffer can also be retrieved using the relative version of get [cheapest wow gold|http://www.wowgoldstudio.com/] (), which uses the position and limit properties of the buffer. In particular, this version of get() retrieves the byte at the position and advances the position by one. get() cannot retrieve bytes past the limit (even though the limit might be less than the capacity). The position is always <= limit and limit is always <= capacity.
    [cheap wow gold|http://www.wow-goldstore.com/]
    // Create an empty ByteBuffer with a 10 byte capacity
    ByteBuffer bbuf = ByteBuffer.allocate(10);
    // Retrieve the capacity of the ByteBuffer
    int capacity = bbuf.capacity(); // 10
    // The position is not affected by the absolute get() method.
    byte b = bbuf.get(5); // position=0
    // Set the position
    bbuf.position(5);
    // Use the relative get()
    b = bbuf.get();
    // Get the new position
    int pos = bbuf.position(); // 6
    // Get remaining byte count
    int rem = bbuf.remaining(); // 4
    // Set the limit
    bbuf.limit(7); // remaining=1
    // This convenience method sets the position to 0
    bbuf.rewind(); // remaining=7
    Edited by: veewei on May 4, 2010 7:31 PM

  • "Can't get Action from Action Reference"?

    I really can't figure out why I get java.lang.IllegalArgumentException with "Can't get Action from Action Reference: BeanName.actionName" message. I specified all properties in faces-config.xml. Bean and its action names are all checked several times, but I still get that exception. Is it a JSF bug, or my simple mistake? Is there anyone who experienced the same problem?
    I'm using two forms in one page. all components' ids are all different. Only one form generated the exception not regarding the order of the forms. (the one is login form and the other (which doesn't generate exception) is leave-comment form.)
    Here is the form code:
                   <h:form id="loginForm" formName="loginForm" >
                        Login >
                        <h:input_text id="loginUserName" valueRef="UserBean.userName">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_text>
                        |
                        Password >
                        <h:input_secret id="loginPassword" valueRef="UserBean.password">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_secret>
                        |
                        <h:command_button id="loginSubmit" label="login" commandName="loginSubmit" actionRef="UserBean.loginAction" />
                   </h:form>
    and here is managed-bean part:
    <managed-bean>
         <managed-bean-name>UserBean</manager-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.UserBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>idStr</property-name>
    <null-value/>
    </managed-property>
    <managed-property>
    <property-name>userName</property-name>
    <null-value/>
    </managed-property>
              <managed-property>
                   <property-name>password</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
    Thanks in advance!

    here goes the source code of NotesBean:
    abstract class NotesBean {
         protected static final String SUCCESS = "success";
         protected static final String FAILURE = "failure";
         private String connectionProfile;
         protected NotesBean() {}
         public String getConnectionProfile() {
              return connectionProfile;
         public void setConnectionProfile(String newProfileName) {
              connectionProfile = newProfileName;
         public abstract Action getCreateAction();
         public abstract Action getDeleteAction();
         public abstract Action getUpdateAction();
         protected Connection getConnection() throws NotesException {
              ConnectionProfile profile = ConnectionProfileFactory.getProfile(connectionProfile);
              return DriverManager.getConnection(profile.getUrl(), profile.getProperties());
    }I think everything is ok with the beans, right?
    By the way: shouldn�t the error message be:
    "Can't get Action from Action Reference: UserBean.loginAction"I just examplified the message using somewhat generic name. Sorry for confusion :)
    As a final try, here is the whole JSP code: (ignore korean texts)
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://gleamynode.net/notes" prefix="notes" %>
    <html>
    <head>
         <title>gleamynode.net :: gathering of my mentality</title>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <link rel="stylesheet" HREF="css/gleamynode.css" type="text/css" />
    </head>
    <body>
    <f:use_faces>
    <notes:useNotes>
         <c:choose>
              <c:when test="${empty param['id']}">
                   <notes:getPages var="pages" />
                   <c:forEach var="p" items="${pages}" begin="0" end="0">
                        <c:set var="p" value="${p}" scope="request"/>
                   </c:forEach>
              </c:when>
              <c:otherwise>
                   <notes:getPage var="p" pageId="${param['id']}" />
              </c:otherwise>
         </c:choose>
         <div id="header">
              <h:command_hyperlink href="index.jsp" label="gleamynode.net :: gathering of my mentality"/>
         </div>
         <div id="menu">
              About | Essays | Projects | Others | Links
         </div>
         <div id="content">
              <div id="page">
                   <div id="pageTitle">
                        #${p.id}. ${p.title}
                   </div>
                   <div id="pageContent">
                        ${p.content}
                        <div id="pageTimestamp">
                             ${p.timestamp}
                        </div>
                   </div>
              </div>
              <c:choose>
                   <c:when test="${fn:length(p.comments) > 0}">
                        <div id="comments">
                             <div id="teaser">
                                  ${fn:length(p.comments)} ?? ??? ????
                             </div>
                             <c:forEach var="c" items="${p.comments}">
                                  <div id="commentHeader">
                                       #${c.id}. ${c.userName}
                                  </div>
                                  <div id="commentContent">
                                       ${c.content}
                                       <div id="commentTimestamp">
                                            ${c.timestamp}
                                       </div>
                                  </div>
                             </c:forEach>
                        </div>
                   </c:when>
              </c:choose>
              <div id="commentForm">
                   <jsp:useBean id="CommentBean" class="net.gleamynode.notes.http.faces.CommentBean" scope="request" />
                   <jsp:setProperty name="CommentBean" property="pageIdStr" value="${p.id}"/>
                   <jsp:setProperty name="CommentBean" property="content" value=""/>
                   <div id="teaser">
                   </div>
                   <h:form id="commmentForm" formName="commentForm" >
                        <input type="hidden" name="id" value="${p.id}"/>
                        <h:input_hidden id="pageId" valueRef="CommentBean.pageIdStr"/>
                        <table width="95%">
                             <tr>
                                  <td class="name" width="9%">Name:</td>
                                  <td class="value" width="25%">
                                       <h:input_text id="userName" valueRef="CommentBean.userName">
                                            <f:attribute name="style" value="width:75%;"/>
                                       </h:input_text>
                                  </td>
                                  <td class="name" width="8%">Email:</td>
                                  <td class="value" width="25%">
                                       <h:input_text id="userEmail" valueRef="CommentBean.userEmail">
                                            <f:attribute name="style" value="width:75%;"/>
                                       </h:input_text>
                                  </td>
                                  <td class="name" width="8%">URL:</td>
                                  <td class="value" width="25%">
                                       <h:input_text id="userURL" valueRef="CommentBean.userURL">
                                            <f:attribute name="style" value="width:100%;"/>
                                       </h:input_text>
                                  </td>
                             </tr>
                             <tr>
                                  <td colspan="6">
                                       <h:input_textarea id="content" valueRef="CommentBean.content">
                                            <f:attribute name="style" value="width:100%; height: 12em;"/>
                                       </h:input_textarea>
                                  </td>
                             </tr>
                             <tr>
                                  <td class="buttons" colspan="6">
                                       <h:command_button id="submit" label="leave a comment" commandName="submit" actionRef="CommentBean.createAction" />
                                  </td>
                             </tr>
                        </table>
                   </h:form>
              </div>
              <div id="loginForm">
                   <div id="teaser">
                   </div>
                   <h:form id="loginForm" formName="loginForm" >
                        Login >
                        <h:input_text id="loginUserName" valueRef="UserBean.userName">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_text>
                        |
                        Password >
                        <h:input_secret id="loginPassword" valueRef="UserBean.password">
                             <f:attribute name="style" value="width:64px;"/>
                        </h:input_secret>
                        |
                        <h:command_button id="loginSubmit" label="login" commandName="loginSubmit" actionRef="UserBean.loginAction" />
                   </h:form>
              </div>
              <div id="copyright">
                   Copyright � 1999~ by Trustin Lee, All Rights Reserved.
              </div>
         </div>
         <div id="footer">
         </div>
    </notes:useNotes>
    </f:use_faces>
    </body>
    </html>and, here is the whole faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
              "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
              "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <navigation-rule>
            <from-tree-id>/index.jsp</from-tree-id>
            <navigation-case>
                <from-outcome>success</from-outcome>
                <to-tree-id>/index.jsp</to-tree-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>failure</from-outcome>
                <to-tree-id>/failure.jsp</to-tree-id>
            </navigation-case>
        </navigation-rule>
         <managed-bean>
              <managed-bean-name>PageBean</managed-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.PageBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>idStr</property-name>
                <null-value/>
            </managed-property>
              <managed-property>
                   <property-name>title</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>content</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>CommentBean</managed-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.CommentBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>idStr</property-name>
                <null-value/>
            </managed-property>
            <managed-property>
                <property-name>pageIdStr</property-name>
                <null-value/>
            </managed-property>
              <managed-property>
                   <property-name>userName</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>userEmail</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>userURL</property-name>
                   <null-value/>
              </managed-property>
              <managed-property>
                   <property-name>content</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
        <managed-bean>
             <managed-bean-name>UserBean</manager-bean-name>
              <managed-bean-class>
                   net.gleamynode.notes.http.faces.UserBean
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>idStr</property-name>
                <null-value/>
            </managed-property>
            <managed-property>
                <property-name>userName</property-name>
                <null-value/>
            </managed-property>
              <managed-property>
                   <property-name>password</property-name>
                   <null-value/>
              </managed-property>
         </managed-bean>
    </faces-config>Thank you for your continuous help, Rene! Learned alot from you about JSF :)

  • Re:  Not getting audio from TV when connecting MacBook Pro with all correct cables.

    How do I get audio from the TV when connecting MacBook Pro with all the correct cables?

    Hi Lynn,
    If you're positive you have the correct cables, and positive they work, they must be plugged into an input on the TV made for that purpose, then that input must be selected on the TV's menu.

  • Get postion from vacancy when transfer applicant data

    Dear all,
    Pls tell me how to get postion from vacancy when transfer applicant data? At the Initial data entry, i chose the advertisement that determine vacancy. But when transfer data, i have to choose the position again.
    Best reagrds,
    Quanglv

    Hi,
    IN PB40 enter additional data you assign applicant to position or vacancy, and when u will transfer data to pa position will come automatically...
    Regards,
    Kapil

  • CS6 Encore requiring a second encode of H264 BluRay from media encoder

    Have noticed that when I encode an H264 file in Blu-Ray for encore, that when I try to build the DVD I get a message that the file is not proessed.  If I go back to media encoder and reprocess the existing H264 file, Encore will then accept it.  I think this is a bug, but in bug report, no option for Media Encoder.  this has happened on 4 seperate occassions since I downloaded th latest Adobe CS6 updates.
    Anyone have any ideas?
    thx...Jim Watt

    Hi John,
    Thanks for the reply.  the file i'm atrtempting to use in Encore is an .mp4v file from media encoder, which is, I think the same file type i've used successfully in the past.  When I re-encode the file has the same extension, but it will work.  I perceive this is a new issue with the latest update of CS6.  I've not encountered this issue before the update.
    Thx...jw

  • Getting Timestamp from Multiple Devices

    I am using LV
    8.0 with the Compact DAQ Chassis and NI 6221 (for the encoder input – because the
    C DAQ system currently does not have any modules for quadrature counter input).
    I have modules NI 9205 and 9237. I will be doing multiple measurements at the
    same time (but not simultaneously). The test will last roughly 30 seconds, and
    in that time frame I will be receiving signals from:
    1) Encoder (for angular position and RPM) (NI 6221 ctr
    input)
    2) Load Cells, Torque Sensor, (NI 9237)
    3) Multiple pressure transducers (NI 9205)
    I would like all these modules to operate concurrently, but
    not be slowed down by other modules (Continuous buffered acquisition?). What
    would be the best way to record and save the data to file with some kind of
    timestamp, so that I know at x degrees (using the NI 6221) the force on the
    load cell was y (using NI 9237)?
    I have tried using the express data acquisition VI but it
    doesn’t allow me to use two different cards. And if I have two different
    express VI’s, all my data is saved in two different files, but I have no idea which
    data point in one file corresponds to which data point in another file in time.
    Example: I look at the encoder file, and see that at 0.5
    seconds the angle was 30 degrees. If I knew the time at which each data point
    was taken, I could do some easy interpolation of the force file to figure out
    what the force should have been at time 0.5…
    Relative Time                          Force
    0.42         
                                        27
    0.50         
    0.61                                        30

    Hi Johnny,
    Since you do not need your measurements to be simultaneous, you can use two DAQ Assistants - one for each device.  You can then use merge signals as shown in the below picture and save them to file using Write to Measurement File Express VI.  The header of the file that is created will tell you the intial timestamp and delta t for each data set, so you will know the timing information. 
    I think this is the simplest solution to what you are trying to do.  Let us know if there is something about it that doesn't work out for you.
    Regards,
    Laura
    Message Edited by Laura F. on 08-01-2006 03:43 PM
    Attachments:
    2DAQAsst.jpg ‏15 KB

  • Getting data from MySQL

    I'm a web developer that is familiar with PHP and MySQL. I
    just started working with a guy who has created a site in Flash for
    a client, and I've created the backend in PHP. It was understood
    that all I'd have to do would be to PUT information into the
    database and he'd pull it out on the site. Things have changed and
    I've been asked to pull the data down for him.
    I've Googled to find out that it's possible to get data from
    MySQL into Flash via a textfile formated as such: 'myVar=[data]'. I
    don't know the specifics, but I can figure that all out. However, I
    have two particular questions regarding the data:
    1.) How does Flash handle HTML formatting? The CMS I've
    written allows an administrator to input plain HTML and I store
    that in the database; how will that translate into Flash? Does
    Flash have an HTML parser? I've been having trouble filtering
    through searches on Google about using HTML to put Flash on a page
    instead of Flash parsing HTML. I read on another forum that Flash
    has an HTML 1.0 parser, but the post was dated August 2003.
    2.) I've also been storing images as BLOBs in MySQL. How do
    I go about pulling these images out? Of the tutorials I've found on
    Google, all I can hit with my searches are scenarios in which
    people store image
    paths in the database, and output them in the same textfile,
    'myImage=/images/image.jpg' etc.
    [url=http://forums.devarticles.com/web-development-40/flash-mysql-longblobs-9659.html]Thi s
    unanswered forum post off-site[/url], is similar to what I'm trying
    to do, but I'd need to display many images in a flash movie and I
    don't think passing them via src would work.
    I'm not necessarily asking for complete solutions for these
    problems, I just need to be pointed in the correct direction, maybe
    a function or a document I'm missing.

    quote:
    Originally posted by:
    MotionMaker
    1. Flash TextFields can handle a limited amount of HTML:
    Supported
    HTML tags. The .html property is enables HTML rendering and
    .htmlText property for asssigning the HTML.
    Those tags would probably be fine. We're not trying to do
    anything fancy.
    quote:
    2. Your PHP scripts cannot send back HTML. They can send back
    data either in URL Encoded format or XML. That means your script is
    only echoing data. The HTML can be stored in data such as a URL
    variable or in CDATA node of XML.
    Ex for URLVars: echo theHtml=<p>This
    is<b>bold</b></p>&var2=1234&var3=true;
    Ok, that's what I thought.
    quote:
    3. You will need your PHP script to create a temporary jpg
    file on the server and send to Flash the name of the file. Then you
    use either MovieClip.loadMovie or MovieClipLoader to fetch the jpg
    on the Flash side. There should be links on the web for the PHP
    part handling the filenaming and the garbage collection.
    Uhg, that's what I also thought, and was afraid of. You told
    me everything I need to know I think. Thank you.

  • Where does CustomIDocumentPlugin:identifyIncomingDocument get doctype from

    When handling positional flat files it looks like doctype is not defaulting from B2B setups for oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument Enter
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument non-XML Payload
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument iDoc ECS = xyzECS.ecs
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument start pos = 71
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument end pos = 75
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument key = [METH]
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument value = [METH]
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument target = [METH]
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument doctype = xyz, doctype revision = 1.0
    oracle.tip.adapter.b2b.document.custom.CustomIDocumentPlugin:identifyIncomingDocument Exit
    the doctype that I have defined in B2B is different than what's being identifyed by CustomIDocumentPlugin
    message only gets processed if I go and change my doctype name to whats in the log.

    I understand start and end position, they are matching. but its identifying the doc type as lets say "xyz" and revison 1.0 , where as there is no such setup in Oracle B2B. my question was where is it getting "xyz" and 1.0. it always defaults to doc type as "xyz" and revision 1.0
    If I go and change my B2B setups (doc type as "xyz") only then the document gets processed or else it errors saying agreement not found.
    This is very strange , is it possible that the doc type is somehow getting derived from ecs and not B2B setups ?

Maybe you are looking for