Share small real-time example using Narrowing Cast & Widening Cast

Hi Guys,
I am trying to understand the concept of Narrowing Cast and Widening Cast and getting confused why we are using these Casts. When we can always access the method of Subclass using its ref object in Narrowing ) and use the Super class with its ref object (in Widening).
I understand the concept but could not understand under what situation cast is preferred.There are articles all over the web to explain the concept, but non told us why and when we are forced to us these CASTS.
I will appreciate if somebody can share a small real-time example where use of Narrowing and Widening Cast is advisable.
Thanks,

It looks like this topic has lost steam. 
I'm surprised this isn't a more intense conversation. There are many applications that need to share data.
In my application I have many hundreds (in some few cases in the thousands) of different types of data streams including DIO, Analog, and many different types of Serial buses.
My application is already controlling the hardware and data streams, but others want to peak into my I/O including what is happening on the serial buses.
To create a 'get' function for each I/O in a web page would seem farily intense (although I could probably create a VI script to help build it).
I was looking for solutions along the lines of maybe coping the data into a VISA service (if that is possible), or publishing to a datasocket server, or creating a network published variable.
I need to be considerate of the possibility of hundreds of serial buses banging a service and the possible bandwidth impacts. So I'm searching for a solution that is both easy to implement and low on resources.
For now I'm leaning towards datasockets. Does anybody have an opinions on this?

Similar Messages

  • Can you provide some real time example of Fit Gap analysis .

    Hi all,
    Can you provide some real time example of Fit Gap analysis related to Functional.
    Regards
    Reddy

    hi,
    In my opinion and experience both functional and technical staff playkey roles in the fit-gap meetings and in the subsequent review of thefit-gap deliverable (which lists business requirements, fits, gaps, andalternatives to fill the gaps). Ideally the technical staff possessessignificant functional / business experience at least with that moduleso that he/she can help determine the cost/effort/technical scope if acustomization or interface is the preferred way to fill a particulargap. The fit-gap goes a long way in determining the overall scope ofthe implementation or upgrade project and is a critical success factor.It also needs to be completed very early in the project so thatresulting customizations and interfaces can be designed, created, andunit tested before the system test phase.
    Thx,
    waseem

  • Real time Example for Time depend Characterstics...

    Real time Example for Time depend Characterstics.
    In which Situation we have to swith to time dependent.

    hi ,
    for ex. employee designation which changes over a period of time but not frequently , also headcount and also stock etc .
    which is related to change over a period of time .
    regards .... kumar Sarvepalli ///// honor points if helpful

  • How can I display a .csv file as a real time waveform using labview

    Hi folks.
    As stated, Im looking to display a .CSV file (obtained via RS-232, example; 100,101,102,102,102,103...) as a waveform in real-time. What is the best way to approach this? Im thinking LabVIEW. I have version 7.1 but am not really experienced in using it. I'll give anything a go though. Also, I have Visual Studio 2005, so I was thinking VB???
    Thanks in advance!
    Simon.
    Message Edited by simonious on 10-26-2007 04:13 AM

    Have a look at this VI.
    Add a convert string to number function behind it.
    André
    Message Edited by andre.buurman@carya on 10-26-2007 01:08 PM
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)
    Attachments:
    convert csvars 2 array of vars.vi ‏16 KB

  • To develop an VI to aquire data of thermocouples from a remote chamber in labVIEW real time, should use NIDAQ or NIDAQmx?

    Hai
    I need to develop an VI to aquire data at real time. Am using LabVIEW RT as the OS and i need to know, if i can use NIDAQ 7.0 or should i use NIDAQmx? what is the diffrence between the two? is it just that NIDAQmx makes job simpler?
    Also can anybody please tell me, how to access a channel in labVIEW? am not clear about the path to follow to get the physical channel as a virtual channel on the LabVIEW.
    I am using a 8186 PXI with labVIEW RT and a SCXI, with both scxi and daq card on the same chassis.
    the development will be done on Windows XP which will be the host machine.
    Thanx in advance for any answers
    Arun

    Arun,
    DAQmx is our new Data Acquisition driver and should be considered as the primary option when writing new applications because of supportability in the future.
    DAQmx does make Data Acquisition tasks much simpler, abstracting many of the board implementation details and giving you a common API for 99% of the tasks you might want to accomplish.
    There are a couple of minimum requirements for using DAQmx on LabVIEW Real Time:
    - You will need LabVIEW Real-Time 7.1 (or higher)
    - You will need DAQmx 7.2 (or higher)
    These requirements are mentioned in the following Knowledgebase:
    Is NI-DAQmx Supported in LabVIEW Real-Time?
    The other thing you might want to make sure of is that DAQmx supports the DAQ hardware you already have or are planning to use. DAQmx does support most of the existing DAQ and SCXI hardware products, and reading thermocouples should become a very simple task.
    With DAQmx you can use physical channels, Global Channels (Aliases for preconfigured physical channels, equivalent to the Traditional DAQ Virtual Channels) or DAQmx Tasks (Preconfigured Data Acquisition tasks that include channel, timing and triggering information). A good place to start to learn about these features could be:
    Advantages of NI-DAQmx
    The following link might be useful to check Hardware support:
    http://www.ni.com/support/daq/versions.htm
    The driver can be downloaded by following these links:
    ni.com -> Support -> Drivers and Updates -> Current Software Versions -> Multifunction DAQ -> NI-DAQ Version 7.3 for Windows 2000/NT/XP
    This includes the latest version of DAQmx and our Traditional DAQ driver. Please note that DAQmx base is also listed but that's our Register-Level Programming (RLP) driver, which provides DAQ support for previously unsupported platforms.
    I hope this helps,
    Alejandro

  • Real time solution using Documaker

    Hi all,
    We are using Documaker 10.3, currently we have a flat file as input to Documaker which creates the forms in our daily batch. Now we are planning to generate few forms in real time, like on a click of button from a source system a document should generate.
    Right now I can think of creating a flat file out of the source system and generate a form (miniature batch), not satisfied with this approach though. Is there any better way of dealing with these kind of situations? Is there any facility (which I am obviously not aware of) in Documaker which can take care of this.
    Thanks in advance

    Venkata,
    You can certainly continue to use the flat-file approach if it satisfies the requirements for your real-time processing. If the source system is not able to generate a "batch of one" extract file, then you will need to explore other methods of generating your input for Documaker, which are going to be specific to your source system -- can you elaborate on this?
    When running Documaker in real-time mode, it's a fairly simple process using components in the Oracle Documaker suite -- specifically Docupresentment. However, with pre-11.4 versions of Documaker, the licensing for Docupresentment was handled separately, so you will need to ensure you are licensed for Docupresentment to use it.

  • Change Narrowing and Widening Cast

    I have ABAP Object 2007 book from Horst Keller and I also have a 7.0 SAP System.
    SAP have changed the terminology from SAP 6.40.
    Please see this hyperlink  [Version 7.0 ABAP Modification 6|http://help.sap.com/abapdocu/en/ABENNEWS-70-DOCU.htm#!ABAP_MODIFICATION_6@6@]
    In addition when I click on Help on MOVE and the Casting operator in my 7.0 Version system is explained as
    Up Cast
    Also referred to as widening cast. Assignment between reference variables, where the static type of the target variables is similar or identical to the static type of the source variables.
    Down cast
    Also called a narrowing cast, a down cast is an assignment between reference variables in which the typr static type of the target variable more specific than the static type of the source variable. A down cast is only possible in assignments with the casting operator (?=) or MOVE ... ?TO. Compare with up cast
    SAP now want you to use the unambiguous terms of UP and DOWN  Version 7.0 of course.
    Does anybody have a pre640 SAP system (46C,47) that can confirm that the terminology has changed ?

    Hi,
    The terminology has not changed, but its a prior mistake made while writing notes, but the concept still remains the same as far as I have check in systems...
    Regards,
    Siddarth

  • Displaying real-time data using gui meter from multiple channels.

    I am using DAQ USB-6009 for my assignment. Part of my task is to display real-data from multiple channels in the form of gui meters.  eg. irradiance and voltage...
    I used a split signal to separate the signals from different channels coming out of the data output terminal of the DAQ assistant. The problem is that I do not know which vi to connect in between the split signal and the gui meter. I am looking for one vi that is capable of handling signals (measurement)  and outputting the data to the gui meters simultaneously and individually based on the channel they are coming from.

    Thnx for your tip, Dennis.
    However, I have another problem that just occurred to me when my VI manages to execute as I wanted.
    I noticed that the needle on my gui meter will only "appears" to be responding to every changes to its input when I have set it to run continuously and the only way to stop it is via abortion which might leave the resources (eg. external hardware) in unknown state. Is there any safer and workable ways to organise the VIs using while loop?
    I have placed my DAQ assistant, write to measurement file (vi), add function, split signal and gui meters all in 1 single while loop.
        DAQ-------> write to measurement file
                 |
                 |                                                 ​                   |--------------------------------> add function----> gui meters
                 ---------------------------------------------> split signals ---|--------------------------------> add function----> gui meters
                                                      ​                                |--------------------------------> add function----> gui meters
    If I do the following steps,
    1. press run continuously to start the VI
    2. click the same button to disable continuous run when the VI has completed its task.
    3. click the stop button in the front panel to stop the while loop
    Does doing these steps ensure that I will not leave resources in unknown state? Is it a safer way to stop a VI which is running continuously?
    Pardon me for I am new to LabView. Even though, I have read the user's
    manual and tried out all the execises, there are some concepts that I
    need clarification on and mistakes that I need to discover through more hands-on.

  • BADI REAL TIME EXAMPLE

    PLEASE CAN ANY BODY WILL  BADI EXAMPLE
    I AM LEARNING BADI
    PLLEASE IF U WORKED ON BADI PLEASE SEND ME WITH DETAILS AND CODING ALSO
    PLEASE
    WITH REGARDS
    VENUMADHAV

    Hi,
    To define a BADI, you need to use SE18 transaction. There you can specify the interface methods that will be called by the program.
    To provide the BADI implementation, you wil have to use SE19 transaction and select the BADI for which you are providing the implementation.
    To invoke BADI from the code, you can refer to the following piece of code.
    Here badi_handle is a variable TYPE REF TO <badi_name>.
    In the example <decompress> is the interface method which is being called.
            TRY.
              GET BADI badi_handle.
              IF badi_handle IS NOT INITIAL.
                " Call BADI method for decompressing the data.
                CALL BADI badi_handle->decompress
                  CHANGING
                    data = lv_data.
              ENDIF.
            CATCH cx_root INTO l_obj_excep.
                "Exception occurred during Decompression. Problems in BADI implementation.
              RAISE ERR_OTHERS.
            ENDTRY.
    Hope this will help you.
    ~ Ramanath.

  • Real time scenarios where Web Dynpro is used

    Hi Experts,
    I am a beginner with Web Dynpro (ABAP ), i have developed a couple of simple web dynpros for practice purpose. I would like to know the below things to get a better idea on the technology
    1. Can anyone who have worked on Web Dynpro share the real time applications which you worked on.(I am not expecting any technical details, i want to understand the scenarios in real world where this technology is used).
    2. If some one can link web dynpro's with CRM/SRM that would help me more.(Once again i need the business scenario)
    Thanks in advance.
    regard's
    Sudheer V

    Hi Sharath,
    Thanks for your response, it was really a useful link. But once again they all talk about technical details but what i was looking for was business scenarios where web dynpro can be used effectively.
    When i was searching for this i found one such scenario where web dynpro gets the quotation details from the CRM system and creates a sales order with reference to the quotation in the SAP R/3.
    I was actually looking for scenarios like the above with some technical details for implementing the same.
    Please let me know if you know scenarios something like the above one.Thanks.
    Regard's
    Sudheer V

  • Using Views in Real time mappings?

    Hello fellow OW Builders!
    I have been investigating OWB 11gR2 as a solution for data warehousing. The requirement I have is to produce a real-time system, to propagate any changes in the source data as quickly as possible, to the targets. The problem I have is, I only have access to the source data via views on the database. I can create 'regular' mappings using views as a data source, as part of a batch load process. However, I cannot set up Queue Operators (required for real-time mappings), using views as the data source.
    I am hoping there are some OWB gurus out there, who might be able to suggest a suitable approach, for real-time data warehousing, using views as a data source? If it helps with your creativity, it doesn't have to be an OWB solution (although I think that would be preferable). The database version for the source and targets is 10gR2, should that be of interest.
    Thanks in advance for your time.
    Edited by: user13130528 on 17-Aug-2010 06:49

    Has this completely foxed everyone?! Even if the answer is 'no way, Jose', it would be good to know, so I can ditch OWB and concentrate on finding another solution.
    Thanks!

  • Shared Variables for Real-TIme Robot Control

    I'm really stuck in my efforts to use LV real-time in my hardware control application. I have a 6-axis industrial robot arm that I must control programmatically from my PC. To do this I've developed a dynamic link library of functions for various robot control commands that I can call using Code Interface Nodes in LV (using 8.5). This has worked great, that is, until I tried to port parts of the application to a real-time controller. As it turns out, because the robot control dll is linked with and relies so heavily upon several Windows libraries, it is not compatible with use on a RT target, as verified by the the "DLL Checker" application I downloaded from the NI site. When the robot is not actually executing movements, I am constantly reading/writing analog and digital I/O from various sensors, etc.....
    This seemed to suggest that I should simply segregate my robot commands from the I/O activities, using my host PC for the former, and my deterministic RT loop on the target machine for the latter. I set up a Robot Controller Server (RCS) vi running on my host PC that is continuously looking for (in a timed loop) a flag (a boolean) to initiate a robot movement command. Because several parameters are used to specify the robot movement, I created a custom control cluster (which includes the boolean variable) that I then used to make a Network Shared Variable that can be updated by either the RT target or the host PC running the RCS. I chose NOT to use buffering, and FIFO is not available with shared variables based on custom controls.
    Here's sequence of events I'd like to accomplish:
    1) on my host PC I deploy the RCS, which continuously pools a boolean variable in the control cluster that would indicate the robot should move. The shared variable cluster is initialized in the RBS and the timed loop begins.
    2) I deploy the RT vi, which should set the boolean flag in the control cluster, then update the shared variable cluster.
    3) an instance of the control cluster node in the RCS should update, thereby initiating a sequence of events in a case structure. (this happens on some occassions, but very few)
    4) robot movement commands are executed, after which the boolean in the control cluster is set back to its original value.
    5) the RT vi (which is polling in a loop) should see this latest change in the boolean as a loop stop condition and continue with the RT vi execution.
    With the robot controller running in a timed loop, it occassionally "sees" and responds to a change of value in members of the shared variable cluster, but most times it does not. Furthermore, when the robot controller vi tries to trigger that the movement has completed by changing a boolean in the control cluster, the RT vi never sees it and does not respond.
    1) Bad or inappropriate use of network shared variables?
    2) a racing issue?
    3) slow network?
    4) should I buffer the control cluster?
    5) a limitation of a custom control?
    6) too many readers/writers?
    7) should I change some control cluster nodes to relative, rather than absolute?
    8) why can't I "compile" my RT vi into an executable?
    Any help would be greatly appreciated. Unfortunately, I'm writing this from home and cannot attach vi files or pictures, but would be happy to do so at work tomorrow. I'm counting on the collective genius in the universe of LV users and veterans to save my bacon.....
    David

    Hi David,
    I'm curious why you decided to build a CIN instead of developing the code in
    LabVIEW.  Is there some functionality that that LabVIEW couldn't
    provide?  Can you provide some more information about the LabVIEW
    Real-Time target you're using?  What type of IO are you using?
    It is impossible to get LabVIEW Real-Time performance on a desktop PC running
    an OS other than LabVIEW Real-Time.  Even running a timed loop in LabVIEW
    for Windows won't guarantee a jitter free application.  Also, no TCP based
    network communication can be deterministic.  This means Network Shared
    Variables are also not deterministic (they use a TCP for data transport) and I
    advise against using them as a means to send time critical control data between
    a Windows host and a LabVIEW Real-Time application.
    In general, I would architect most LabVIEW-based control applications as
    follows:
    - Write all control logic and IO operations in LabVIEW Real-Time.  The
    LabVIEW Real-Time application would accept set points and/or commands from the
    'host' (desktop PC).  The Real-Time controller should be capable of
    running independently or automatically shutting down safely if communication to
    the PC is lost.
    - Write a front-end user interface in LabVIEW that runs on the desktop
    PC.  Use Shared Variables with the RT-FIFO option enabled to send new set
    points and/or commands to the LabVIEW Real-Time target.
    Shared variable buffering and RT-FIFOs can be a little confusing.  Granted
    not all control applications are the same, but I generally recommend against
    using buffering in control applications and in LabVIEW Real-Time applications
    recommend using the RT-FIFO option.  Here's why:  Imagine you have a
    Real-Time application with two timed loops.  Time-loop 'A' calculates the
    time critical control parameters that get written to hardware output in
    timed-loop 'B'.  Loop 'A' writes the outputs to a RT-FIFO enabled variable
    with a RT-FIFO length of 50.  Loop 'B' reads the outputs from the shared
    variable, but for some reason, if loop 'B' gets behind then the shared variable
    RT-FIFO will now contain several extra elements.  Unless loop 'b' runs
    extra fast to empty the RT-FIFO, loop 'B' will now start outputting values that
    it should have output on previous cycles.  The actual desired behavior is
    that loop 'B' should output the most recent control settings, which means you
    should turn off buffering and set the RT-FIFO length to 1.
    There is also a clear distinction between buffering and the RT-FIFO
    option.  The RT-FIFO option is used to add a non-blocking layer between
    network communication and time-critical code in LabVIEW Real-Time
    applications.  It also provides a safe mechanism to share data between two
    loops running in a Real-Time application without introducing unnecessary
    jitter.  Network buffering is a feature that allows a client to receive
    data change updates from the server even if the client is reading the variable
    slower than the server is writing to it.  In the example I presented above
    you don't need to enable networking because the shared variable is used
    entirely within the Real-Time application.  However, it would be
    appropriate to send control set points from a Windows PC to the Real-Time
    application using network published shared variables with the RT-FIFO option
    enabled.  If it is critical that the Real-Time application executed all
    commands in the sequence they were sent then you could enable an appropriate
    buffer.  If the control application only needs the latest set point
    setting from the Windows host then you can safely disable network buffering
    (but you should still enable the RT-FIFO option with a length of 1 element.)
    Network buffering is especially good if the writer is 'bursty' and the reading
    rate is relatively constant. In the robot application I can imagine buffering
    would be useful if you wanted to send a sequence of timed movements to the
    Real-Time controller using a cluster of timestamp and set point.  In this
    case, you may write the sequence values to the variable very quickly, but the
    Real-Time controller would read the set points out as it proceeded through the movements.
    The following document presents a good overview of shared variable
    options:  http://zone.ni.com/devzone/cda/tut/p/id/4679
    -Nick
    LabVIEW R&D
    ~~

  • OBIEE 11g Real-time Decisions

    Hello All,
    I have installed OBIEE 11.1.1.6.0 and started Real-time decisions using the Url :http:localhost:7001/ui .Here, I was successfully able to login but I clicked on "Open Inline Service" and getting error like "There are no deployed inline services".
    Moreover I am new to OBIEE-RTD ,Can anybody give me the step by step example for How to implement Real time decisions or SampleApp with example.
    Thanks in Advance.

    Hi,
    You will need to deploy the RTD inline service using the decision studio. Please refer to the developer guide for that.

  • Real Time deployment

    Hi SAP Experts,
    I would like to understand more details on real-time deployment functionality of deployment. Does real time deployment works for multi-level location scenarios ?
    As I understand the real time deployment first runs the SNP heuristics to consider the latest demand supply situation but does it run the heuristics for the entire network for that product or only look at the location connected one level up from the supply location ?
    Example:  I have a Markets A, B and C which are connected to in-stock locations X, Y and Z which send the net requirements to the plants A B C.
    My supply chain is plant 1, 2, 3 are connected to stock locations X, Y and Z and which in turn are supplying to each markets A, B and C.
    If I want to run the real time deployment using supplying plants 1,2 and 3  
      the real time deployment will only deploy receipts to in stock locations X, Y and Z (which is one level up from the plants) or
      Will I see the deployment results at markets A B and C (all through the network upto the markets)
      Does it looks at low level codes in the network while running the heuristics for the product.
    Real time deployment at supply locations only look at in stock locations Z, Y Z or when it runs the heuristics it actually runs the heuristics at the market locations A, B C to update all the net requirements at X, Y, Z and then run heuristics at X, Y, Z to calculate net requirements for plants 1, 2, 3 and the deploy in reverse order up the way to markets from supply plants. Does it looks at low level codes in the network while running the heuristics for the product.
    Thanks and regards,
    Amit

    Hi Amit,
    Like you i am also exploring real time deployment.
    As far as i have understood , real time deployment will run a heursitic between the source and destination location(if specified in SNP02 ) or run heuristic on all t-lane connections between source and all possible destination locations (if dest loc not specified in SNP02) & then take the normal deployment run.
    This will be valid for scenarios wherein you want to consider destination locations demand arriving after the last SNP run.
    Hope this helps.
    Do come back with your testing results.
    Regards,
    Vinay

  • [Solved] QJackCtl won't start in with real time.

    Hey all,
    I'm having a problem with QJackCtl, I got my version from Extra. The problem is that for some reason Jack won't start in real time mode using QJackCtl. Real Time is checked and marked under the set-up tab, but that little piece of info doesn't seem to make it to jackd. If I start Jack through CLI it works with real time, but not from the GUI.
    I figured this out by starting JACK from the command line and then starting QJack. When I would do that it would be running in real time just without the rest of my settings (buffer,periods,sampling rate, etc).  So in my head there's an issue with QJackCtl. I've tried to find a solution, but I can't seem to find one. This isn't the first time I've set JACK up on a system, but this is the first time I've had this problem.
    The rest of the system is set up and ready to go. Rt Kernel, limits.conf and all other tuning is done.
    Is there something I missed when setting this piece of software up? Any ideas?
    Solved Edit:
    Okay, so right after I posted this I got a crazy idea. When you enter setup in qjackctl on the first page there's a box for server path. The path defaults to "jackd". On that line I added "--realtime", so it looked like a basic CLI start-up of JACK and now it works!
    So, if anyone else has this problem go to the Setup tab, in the setup window on the line that says Server Path it should look like this:
    jackd --realtime
    It worked for me and I hope it helps somebody else out.
    Last edited by Zen:Core (2010-04-03 21:41:52)

    Which volume? Assuming you're on the most common usecase (single hw audio device) then whatever command line you use (amixer for example) it'll work fine, it'll control the volume of the device rather than the pulseaudio plugin (so other playing apps get affected as well, which is probably what you want). The 'global' volume so to speak.
    For multiple hw audio devices it gets tricky though.

Maybe you are looking for

  • IOS 8 voice dialing, "Just to confirm..."

    What a huge step backward in the usability of my iPhone.  Instead of telling Siri, "call Mom mobile" and getting the response "calling Mom mobile" followed by the call going through, Siri now responds with, "Just to confirm, would you like to call Mo

  • How can I add a "junk mail" mailbox?

    How can I add a "junk mail" mailbox, or any other mailbox to my email?

  • Recording into logic from my MPC 1000 Redux

    I want to record a four bar drum beat, bass line..etc Also, I have some existing beats that i made on my MPC before I got Logic that I would like to transfer over to logic. Any thoughts on how to record into logic from my MPC? I can't seem to get any

  • Roller Coaster tycoon 3

    Hello. I do not know if it's a bug in the game itself, or whether it's my computer. But I bought rollercoaster tycoon 3 on my Macbook Pro and when I turn on the player and will put any trees that fill the 1x1 is the invisible. It also happens to buil

  • Outlook notification appears before email arrives in inbox

    issue we have with a couple of folks,  outlook notification appears before email arrives in inbox.  any idea why this happens? if they click on the inbox, then click on another folder, then click back on the inbox, they email shows up.  users are get