Delaying read

Hey,
I'm writing a times table test and I want to only allow 10 seconds for each question but you have an infinite amount of time to enter the variable. Is there a way to over ride this process?
Also how do you use the ESC key in small basic?
Thank you

Hello Zock,
I found this topic interesting enough that I thought about taking this challenge. I usually don't prefer looking at other posts/answers until having a try at it myself. That way, I could get a better understanding of the problem. However, upon contemplating
a solution, I realized that I couldn't come up with anything at all. Seeking guidance, I studied your example and it worked just as expected, but I only ended up more confused. With any program, the computer reads each line sequentially and repeatedly
one at a time. In the main loop, all the code nested inside is constantly reread and no other part of the program. Keeping these points in mind, I deducted that (in the main loop) the question is generated, roughly a millisecond is passed and
stored(?), and finally user input is awaited by the program. But, in the text window, read() and readNumber() usually pauses the program until there is user input. That means, the code in the main loop can't loop if its waiting for user input? How can the
program track the time in this situation? Even putting aside read(), how can it read Check_Answer() if it isn't the main loop? Sorry If I explained any concepts incorrectly or misread it. I am not too familiar with the Timer. Any explanation is welcomed. 

Similar Messages

  • Weird delay reading shared variables

    Hello,
    I'm working on a project were I'm monitoring some prodution lines. I'm using DSC module's OPC server to connect to PLCs on the production line and I've created bound variables on my labview project of the PLC's tags.
    On my project I have one main VI were I show information about the production lines and were I can access several subVIs were I show other information about those lines. Then I have a VI that is running in background were I'm reading about 50 shared variables from the PLC and where I'm registering some data in a MySQL database, datalogging data on the Citadel database and registering alarms.
    The problem I'm having is that on the VI that runs in background I noticed a delay reading the variables that are reading containers weights from the production line. It seems that all the other shared variables don't suffer any delay, only the weight variables start having some delay when the values are increasing. It also seems like that, when I'm only running that VI alone, without running the main VI, there isn't any kind of delay. I'm reading the shared variables as shared variable nodes.
    Can anybody help me understand what's happening and how can I fix this delay? The VI that runs in background is time critical and a weird delay like that messes up my data.
    Solved!
    Go to Solution.

    Hi Mateus23,
    The shared variable has various buffering capabilites, including integration with the Real-Time FIFO feature in LabVIEW Real-Time.
    I guess that the buffering settings are causing the unexpected behavior.
    Check these resources:
    Buffered Network-Published Shared Variables (whitepaper)
    Shared Variables Properties Dialog
       - Network Page
       - Real-Time FIFO Page
    ~~

  • Big delays reading or saving files from Nas BetApp fas 2020

    I support a Newsletters magazine. They own 5 Imacs 20" -mid 2007, and early 2008. running Mac OS 10.6, and Adobe Creativ suit 4. From time to time, they experience large delays reading or writing files to the Nas NetApp fas 2000. The network is 1 GB. they don't have this problem on PC's.
    Any idea how to stop these delays?

    Are you absolutely sure the network is a bona fide gigabit one all the way?
    We had problems with files taking forever to load from a network share. It turned out, that the IP phone which fed our Mac Pro through its built in switch was the culprit. Its switch was a mere 100Mbit capable one.

  • Adapter Engine delay reading Queue

    Hello,
    Can anyone help me with the following:
    Since a day or two we have been experiencing delays in message processing in the adapter engine. The delay is always in the same step when looking at a message via MDT:
    2007-05-21 14:30:25 Success Message successfully put into the queue.
    2007-05-21 15:33:33 Success The message was successfully retrieved from the receive queue.
    Here there is a one hour gap for a step that normally takes only 1 second. The delay appears and disappears without intervention. On friday there was a delay of 45 minutes and yesterday it was one hour (always at the end of the afternoon).
    Which queues does this regard? Are these the queues shown via this link? http://<server>:<port>/MessagingSystem/monitor/systemStatus.jsp
    Sander

    I think below SP19 (or is it 20) the file adapter and jdbc adapter share one of those four queues if same direction and same asynch/synch type.  Pretty sure they split in 19 or 20.
    You can increase max threads on the queues.  It's in visual admin, but I can't remember exact parm at the moment (one is 'max consumers', or something similar).
    We ended up creating a de-central AE to move high volume/low priority messages separate from low volume/high priority messages.  It's was just our way of dealing with our mix of messages.

  • Spurious commands delaying read time

    I thought this particular problem had been cured, but it seems to have come back. I’ve been using a Modbus development tool to read ADC output values without a problem. I've written a small vi which should do the same thing. It runs on the same PC and uses the same COM port. Obviously I have to close the Modbus programme to release the COM port for LabView. The vi runs fine, but data only appears on the front panel every 8 seconds.
    Putting in a 500ms delay in MB Serial Receive.vi improves the response time to around 500ms, but I need 100ms.  A shorter delay just results in 8 second refresh times again. The 500ms delay workaround has been implemented in the vi Reverse Power by putting the delay in a FOR Loop.
    I’ve created log files looking at the data flows and they are very different between the dvelopment tool and the vi. I’ve attached these. For the Modbus development tool it can be seen that at line 130 that the data is written as a single word, and immediately received as a single word.
    For the vi, there’s a lot of communication activity at the start that as a novice I don’t begin to understand, but at line 35 the data gets written. However, the read operation doesn’t take place until line 68.
    I've attached the vi, Reverse Power, and the sub-vi's, and the log files. I would appreciate any ideas on how to solve this problem. Thank you.
    Attachments:
    Modbus Spurious Commands.zip ‏649 KB

    Hello Placebo,
    Thank you for your post on this forum.
    I have had a look at your code and I need to ask you for some clarifications to better understand the issue. From your post I could gather that you were experiencing similar issues before. Is this the case? Did you manage to solve it at that time?
    Moreover, it would be hard for me to test your code since I don't have the hardware you are currently using. It might be useful to give me some more information on what you are trying to do.
    The link below might help you if you have not seen it before:
    http://zone.ni.com/devzone/cda/tut/p/id/7675
    Have a look to make sure you have implemented your VIs properly.
    Many thanks,
    Shalini B
    Applications Engineer
    National Instruments UK & Ireland

  • Why do I get IOException on nio read from channel before all data is read?

    I am working on an NIO based http client library but I've noticed two problems.
    #1: I have been testing against an http server that has authentication turned on. Hence, any request that comes its way will respond with a '401 Authentication Required' response. In the case of a POST, I've noticed that this particular http server does not wait for the body to arrive before responding. As soon as it gets the headers, it dumps the 401 response onto the channel and closes the connection. My library then gets an IOException on the next write to the channel even though I've received write interest event. (I'm using non blocking mode)
    Whether I get the exception depends on timing. Sometimes, my writes work and the exception is averted. Sometimes not. The longer I delay since the time I get the write interest event, the more likely it is the exception will occur.
    Now, in this situation, I really think it's the http server that is violating the http protocol. I give a valid content length that is not zero but it does not wait for me to finish my request. The moment I write the last empty line of the header section, it responds and closes the channel. Even though I don't think this is correct, my library has to deal with it. So in this situation, I've decided my library will abandon the write phase and move on to reading the response.
    NOTE: In the majority of cases, a client would have already authenticated by landing on some page that could produce a POST in the first place. However, for technical reasons I can't mention here, I must support the case that the very first (unathenticated) request to the server is a POST.
    2) After #1 above occurs, reading from the channel will also throw an IOException but only on Windows. Sometimes I get the headers only, sometimes the whole document, sometimes nothing. Again, the longer I delay reading (since the time I get the read interest event) the more likely it is the exception will be thrown. This NEVER happens on Linux. I always get the full response on Linux after the #1 happens even if I put long delays between reads.
    I can understand #1 happening but #2 should not. I can always see the complete response data on the wire using a network protocol analyser. The data is there every time but my library doesn't always get it.
    In situation 2, there is nothing I can do. If I don't receive the data, I have to respond with an error even though the request was successful.
    I have stripped down my library to the bare essentials and can reproduce the problem in a self-contained environment every time.
    Any ideas why the discrepency between Windows/Linux? Does this seem right?

    I read through the section you mentioned. I realize the connection may be dropped at any time. Handling this is no problem. It is reported as an exception to the client. However, this situation is different. I still see no provision that allows a server to respond to a half written request. A request is defined to include an optional message body (Section 5). The client dictates whether it is optional, not the server. Furthermore, section 6 clearly states "After receiving and interpreting a request message, a server responds with an HTTP response message.". To me, this implies the server must wait for the entire request before responding even if its a waste of time. This particular server is attempting to short circuit what I see is the required request/response cycle. In doing so, it is causing me some pain in trying to deliver its response since it seems on windows this interferes with my ability to read it.
    The simple answer to this is to process reads before writes, i.e. OP_READ before OP_WRITE. I tried this as well. Originally, I was not even registering READ interest while I was writing my request. (I saw no reason to. I don't want to give my client a response while they are writing their request.) But even when I do register READ interest while I'm writing (and process read events before write), the read event still produces no data and no eof (-1) indication on the read. The discrepency between linux and windows is bothering me. No matter what I do, I can't deliver the response even though its written to the channel by my peer. I think I will supply some code and see if anyone can get it to work on windows.Edited by: r2rossi on Sep 24, 2008 10:42 AMEdited by: r2rossi on Sep 24, 2008 10:43 AM
    Edited by: r2rossi on Sep 24, 2008 10:45 AM
    Edited by: r2rossi on Sep 24, 2008 10:46 AM

  • Huge Delay in Photoshop CS4 features

    Hey. I've download Photoshop CS4 and running it in trial mode. When I use the brush tool for example, the delay in it actually printing on the paper after I click and drag is like 1-2 seconds. I have a pretty good PC, 2.4ghz @ quad.
    Any ideas?

    uncheck advanced drawing in the gpu enable advanced features.
    you may also want to turn of 'show overlay' and clipping in the clone stamp feature if you use that often and notice a delay.

  • Shoudn't 'put with expiry' throw with read-write backing map?

    Good morning all,
    If I run this client code:
    cache.put(1,  1, CacheMap.EXPIRY_NEVER);I'd expect this entry to never expire. Yet with a read-write backing map it does - immediately, which lead me to digging a bit more...
    According to the [java docs|http://download.oracle.com/otn_hosted_doc/coherence/330/com/tangosol/net/NamedCache.html#put%28java.lang.Object,%20java.lang.Object,%20long%29] support for this call is patchy:
    >
    Note: Though NamedCache interface extends CacheMap, not all implementations currently support this functionality.
    For example, if a cache is configured to be a replicated, optimistic or distributed cache then its backing map must be configured as a local cache. If a cache is configured to be a near cache then the front map must to be configured as a local cache and the back map must support this feature as well, typically by being a distributed cache backed by a local cache (as above.)
    >
    OK, so the docs even say this won't work. But shouldn't it throw an unsupported op exception? Is this a bug or my mistake?
    rw-scheme config:
    <backing-map-scheme>
      <read-write-backing-map-scheme>
         <internal-cache-scheme>
            <local-scheme/>
         </internal-cache-scheme>
         <cachestore-scheme>
        </cachestore-scheme>
        <write-delay>1ms</write-delay>
      </read-write-backing-map-scheme>
    </backing-map-scheme>Edited by: BigAndy on 04-Dec-2012 04:28

    Quick update on this - I've raised an SR and Oracle have confirmed this is a bug and are looking into a fix.

  • RMI server invocation delay

    Hello, I have a problem with server invocations. If I call the method that just prints to the console toString of passed MyClass instance, it takes 4.5 seconds.
    If I pass String or null it works less than 10ms.
    This problem appears only at the special environment.
    Server should be at the Linux and client at the Windows.
    The Client is an applet. This applet should be loaded from the Linux server.
    But I have some Win computers that doesn't have this problem though they all are with XP and IE6.
    Combinations like Linux-Linux, Windows-Linux, Windows-Windows work normal.
    Besides if I even start this client from my IDE or just from my file system it works fast.
    I can't even detect conditions which enough to reproduce this problem.
    Here is my code:
    TestServerIntf.java
    public interface TestServerIntf extends Remote {
        void printMe(MyClass myClass) throws RemoteException;
    }TestServer.java
    public class TestServer implements TestServerIntf {
        public static void main(String[] args) {
            try {
                TestServerIntf engine = new TestServer();
                TestServerIntf stub =
                       (TestServerIntf) UnicastRemoteObject.exportObject(engine, 0);
                Registry registry = LocateRegistry.createRegistry(1099);
                registry.rebind("TestServer", stub);
                System.out.println("TestServer server bound");
            } catch (Exception e) {
                System.out.println("TestServer server exception:" + e.getMessage());
        public void printMe(MyClass myClass) throws RemoteException {
            System.out.println(myClass);
    }TestClient.java
    public class TestClient extends JApplet {
        private String host = "SERVER_HOST"; // specify here right host name
        private TestServerIntf server;
        public void init() {
            try {
                SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                        createGUI();
            } catch (Exception e) {
                e.printStackTrace(); 
        private void createGUI() {
            try {
                Registry registry = LocateRegistry.getRegistry(host);
                server = (TestServerIntf) registry.lookup("TestServer");
            } catch (RemoteException e) {
                 e.printStackTrace(); 
            } catch (NotBoundException e) {
                 e.printStackTrace(); 
            final JLabel label = new JLabel();
            getContentPane().add(label, BorderLayout.CENTER);
            try {
                MyClass myClass = new MyClass();
                long t = System.currentTimeMillis();
                server.printMe(myClass);
                label.setText("PrintMe " + (System.currentTimeMillis() - t) + "ms!");
            } catch (RemoteException e1) {
                 e1.printStackTrace(); 
    }MyClass.java
    public class MyClass implements Serializable {
    }Besides if change the signature to "void printMe(Object object)" and pass "new MyClass[]{myClass}" than it takes 9 seconds! But "new MyClass[]{myClass1, myClass2}" takes also a 9 seconds.
    I don't hope that you can reproduce this problem, but may be you have any ideas what is this problem connected with.
    Please help.

    Java does a reverse DNS lookup when you provide an IP address so DNS does come into it. I would say DNS is almost certainly the cause of the delay.

  • Keyboard character repeat delay

    I have JDK 5 Update 4. Does anybody have an idea on how to access the keyboard character repeat delay and repeat rate?
    I want to shorten the delay and possibly the repeat rate. Is there a way to get the keyboard and it's properties somehow?

    lol I delt with the same issue while making a galaxian clone.
    I wanted to completely get rid of the delay and make the repeat rate equal to as fast as java could execute it (meaning assume that it repeats every single time the paint() method gets executed).
    for instance, if I want the ship to move left and keep moving left (meaning no delay and incredibly fast repeat rate), I did this:
    inside my KeyListener I have boolean Left. inside keyPressed, I have a switch statement that, if the left key is pressed, sets Left to true. inside my paint() method, I check to see if myKeyListener.Left == true. if it does, I move my ship to the left. inside of keyReleased I have a switch that sets Left to false. therefore, there is no delay at all between the key being pressed and the ship moving, and so long as you hold the key down, the ship keeps moving over at a constant rate that has absolutely nothing to do with the repeat rate of the KeyListener. hacking into the OS is way unnecessary.
    if you want there to be a significant delay (the way my firing of bullets does), then do this
    //inside the constructor of your GUI, set long milliSec to System.currentTimeMillis().
    if (MyKeyListener.SpaceBarIsPressed == true && System.currentTimeMillis() >= 500+milliSec)
         //the code necessary to shoot a bullet
         milliSec = System.currentTimeMillis()
    }that will make it so the next bullet cannot be fired until its been at least 500 milliseconds since the last bullet was fired. giving you a constant repeat rate with no start delay.

  • Average Queuing delay too high!

    Below is my server's .perf output. My server is Intel Pentium IV 3.06 Mhz 1 GB RAM on windows 2000.
    Can anyone help?
    Process 4028 started Thu Feb 19 09:56:34 2004
    ConnectionQueue:
    Current/Peak/Limit Queue Length 0/23/4096
    Total Connections Queued 39754
    Average Queueing Delay 1179,77 milliseconds
    ListenSocket group1:
    Address http://213.232.7.201:80
    Acceptor Threads 2
    Default Virtual Server https-jo.smsnet.com.tr
    KeepAliveInfo:
    KeepAliveCount 185/1024
    KeepAliveHits 17554
    KeepAliveFlushes 0
    KeepAliveRefusals 0
    KeepAliveTimeouts 12830
    KeepAliveTimeout 30 seconds
    SessionCreationInfo:
    Active Sessions 1
    Total Sessions Created 48/128
    CacheInfo:
    enabled yes
    CacheEntries 934/1024
    Hit Ratio 33616/46930 ( 71,63%)
    Maximum Age 60
    Native pools:
    NativePool:
    Idle/Peak/Limit 22/22/128
    Work Queue Length/Peak/Limit 0/20/0
    Server DNS cache disabled
    Async DNS disabled
    Performance Counters:
    Average Total Percent
    Total number of requests: 35776
    Request processing time: 0,2735 9785,5781
    default-bucket (Default bucket)
    Number of Requests: 35776 (100,00%)
    Number of Invocations: 474693 (100,00%)
    Latency: 0,0149 532,5323 ( 5,44%)
    Function Processing Time: 0,2586 9253,0459 ( 94,56%)
    Total Response Time: 0,2735 9785,5781 (100,00%)
    Sessions:
    Process Status Function
    4028 response service-dump

    Web Server 6.1 will sometimes dramatically misreport the average queueing delay, particularly on SMP systems or systems with fast CPUs. This is almost certainly what is occurring on your server.
    This problem should be fixed in 6.1 SP2.
    Apart from a low cache hit rate -- perhaps you are making extensive use of CGIs or other dynamic content? -- the rest of the performance data seems reasonable. Unless you are experiencing performance problems, I recommend ignoring the reported average queueing delay.

  • I understand it is possible to have a delay of 60 s between transitions in Keynote for ipad. How do I do this?

    I understand that it is possible to have a delay of 60 s (rather than the 10 s shown on the slider) between transitions on Keynote for ipad. Can anyone tell me how to do this?

    casper,
    Are you looking at Keynote for the Mac or Keynote for iOS?
    I see that option for the Mac but not for the iPad (that's why I didn't reply earlier, I couldn't find out how to do it either other than maybe duplicating slides and inserting delays with no transition to make it look like a longer delay (no change + delay, no change + delay, etc = long delay) ).

  • Problem reading data from database

    Hi All,
    I'm doing some test with Oracle Coherence, particulary testing partitioned cache of a database. I'm using a client/server archictecture and I developed my own CacheStore. So, the problem is, after start the server and the client, when i do a get() in the client for a object that is on database and not in the cache, the cache answer is it doesn't exist. Isn't it supposed the cache "call" the cache store and read/verify if it is on database?
    My Configuration file:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Recharge</cache-name>
    <scheme-name>partitioned-cache</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>partitioned-cache</scheme-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <write-delay>0</write-delay>
    <read-only>false</read-only>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-name>InMemoryScheme</scheme-name>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>RechargeCacheStore</class-name>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <listener/>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    Tanks,
    Paulo Sousa

    Hi Paolo,
    You should use a fully qualified class name to enable the JVM class loader to find the RechargeCacheStore class.
    Regards,
    Harv

  • EX60 delays from 10 to 30 sec when calling another device

    This Terminal EX60 Works OK, but the only thing is that when calling another device takes too long for the other device to receive the call.  This EX60 is registered to CUCM 10.5.1 and its firmware is tc7.2.0
    ANY HINT?
    Thanks so much for any help.

    Are you dialing URI or extensions? If its extension, do you see some delay when dialing from a SIP phone on CUCM? You "might" be experiencing some post dial-delay. Try assiging an extension a URI and call this URI directly and see if you have a delay.

  • Problem with delay printing utilizing a canon IR c1030 with the lasted drivers

    Hi, I am a total noob at Mac OS
    I have Macbook pro with Mountain Lion installed I also have conected to our organization a Airport Express which I use around the office. The problem is that my department have a network printer Canon IR C1030 which I installed the lasted driver UFRII but when I print its takes a very long time and most time a get the error code: 9 and out of 10 pages I get only 3 to 4.my guesss is that is a problem with the Airport Express and latency but I am not sure. could someone give me a clue what to do next
    Thanks in advance

    Does the iR C1030 have support for WiFi or is it using it's built-in Ethernet port to connect to the AirPort Express? Or are you using the USB port on the C1030 to connect to the Express?
    If the C1030 is connecting to the Express via Ethernet, then as a test I would suggest you connect the MacBook Pro to the Express via Ethernet also.
    Note that if there is only a single Ethernet port on the Express then you will need a unswitched hub to connect to this port on the Express and then you can connect the Mac and C1030 to the other Ethernet ports on the hub.
    If you get the same latency when printing from Mac for this Ethernet-only setup, then this would confirm that it is not a WiFi issue and there is something else contributing to the delay.

Maybe you are looking for

  • I have windows server 2012 R2 and install active directory

    My question is I install active directory in windows server 2012 R2 and create Group Policy. ( These set-up is only for test) Have not registered domain only install active directory to test.  So the problem is when I created Group policy for my user

  • Why can't I get Smart Print to open?

    I have an Officejet J3680 All-in-One printer and my laptop uses Windows 7 (64).  I was trying to find the Smart Print icon and in doing so I saw a note saying there was a newer version of Smart Print (2.0).  I tried to install it and it said I had to

  • Styles and Cascading Style Sheets ??

    We have existing many procedures in RH5X that we have created over the past two years. Our company has designed a new .css that contains new styles. Is there anyway to easily and quickly apply these new styles to our existing topics and projects?

  • SAP DB connect errors

    Hi      We have an SRm 7.0 running on windows 2003 64 bit the database is MS-SQL 2005. We keep getting the connect and disconnect errors. DB-error 11 BVV BVY BV4 etc. I dont see a place to attach the screen shot here.

  • Preserve filenames in A3 web gallery?

    Is there a way to use original filenames (version or master doesn't matter) for the jpg files created for web galleries as opposed to the 'picture-1, picture-2..' renaming convention? I see this question dating back to 2006 but no solutions yet. As n