BonesPlayer.queue loop streaming

Part of code like this

Repeat with i = 1 to 4

Scene.Model("wnpc").bonesPlayer.queue (dance [i], 0, 0,-1, 1, 0)

end repeat

Each game of movement once in order, after the last game of the motion, the animation stops.

But I want the animation will loop continuously on the game from the first query,

I can remove all the motions, then add queries, it's embarrassing.

A better idea for this?

I would put up a reminder so that there are always two animations on the playlist (the current and next animation):

pNextAnim property

on beginSprite

pNextAnim = 4

Scene.Model("wnpc").bonesPlayer.queue (dance [1], 0, 0,-1, 1, 0)

Scene.Model("wnpc").bonesPlayer.queue (dance [2], 0, 0,-1, 1, 0)

Scene.Model("wnpc").bonesPlayer.queue (dance [3], 0, 0,-1, 1, 0)

Scene.Model("wnpc").registerScript (#animationEnded, #queueAnim, me)

end beginSprite

on queueAnim (me, tEvent, tModelName, tCurrentTime)

Scene.Model("wnpc").bonesPlayer.queue (dance [pNextAnim], 0, 0,-1, 1, 0)

pNextAnim = pNextAnim + 1

If pNextAnim = 5 then

pNextAnim = 1

end if

end queueAnim

Tags: Director

Similar Questions

  • How to make a gif animated "loop" (streaming)?

    I just added a gif animated on a site of muse. How can I make play continuously or "loop"?

    I just download a trial of animated, GIFS placed in a rectangle in Muse and preview.

    He shows a good preview in browser so as Muse.

    Here is the link to animation SLAP http://www.animatedgif.net/animals/horses/horse-3_e0.gif

    May I ask how did you place this GIF. And it does not work when preview you in the browser or after the publication of the file?

    Kind regards
    Radi amin

  • Use loop - unpredictable queue rate

    Hi all

    I develop the structure of producer-consumer on RT, and I have a strange problem. I get data from the FPGA producer loop and send queue loop of consumer. Then they must cross flow network host. Due to the fact that consumers stay at the producer (queue overflowed), I started to slow down producer (the cost of this action sends more data). It did not help, so I added the structure of the case to the producer to send data to just half of the queue (those to TRUE in the shift register).

    This is the moment where I realized that sometimes closing LabVIEW environment and opening it again the effects to accelerate the transmission of the queue. Then I can even speed loop producer and my queue is not overflowing! And I can stop and run my program and it still works well.

    I finish by closing and opening of LabVIEW and run my entire program again wait that it 'click', because when he finally arrived, I have no problem until the next session of LabVIEW.

    Someone has an idea of what I could do wrong? Or how could I solve this problem?

    Dear Owca

    I see no problem in the code that you sent, and the speed with which you work are relatively low, too. This brings me to assume that the other parts of the code can be causig the problem you are experiencing. Let me make some suggestions:

    • Check the CPU usage when the VI is running. Because the consumer is runing at normal priority (as it should), other priority tasks could starve it.
    • Is the amount of data about in a table? Another good test is to monitor the memory usage to see if fragmentation is causing a disorder.
    • Using a queue of fix size? If this isn't the case, I recommend to avoid dynamic memory allocations.

    Disabling debugging features allows a little. Please get back to me if you have results.

    Kind regards:

    Andrew Valko

    NOR Hungary

  • loop of two producers for quick DAQmx and the user controls?

    Hello

    Sorry if my question is maybe a bit too general (I don't have a VI implementation yet).

    I think about the solutions for a Structure of producer-consumer with event loop in the part of the producer.

    So far, if I had to do a project with DAQ, data analysis, data recording and enter the user controls, I've followed usually this kind of approach:

    I used the producer part to capture interactions with the user, and I also had a state machine in the part of the producer, with registry change. I also buy (any faster then 10ms) DAQmx device data in the part of the timeout of the structure of the event in the loop of the producer. I have several consumer loops down, such as data analysis, data recording, etc... I send the data measured in a cluster with the enumerations of the State of the loop from producer to consumer with queue loop.

    I'm not happy with my approach for the following reasons:

    1,

    If I need device acqure faster DAQmx data that the operating system clock can handle (like 1 MHz), so I can't put it in the part of time out of the structure of the event of the producer loop, because here I can go through the while loop with minimum 1 ms.

    2,

    If I put this part DAQ in a loop for quick consumption, it is not admissible for orders from the QUEUE line after that it starts to run (assuming that I use the standard structure of producer-consumer, so consumer loop every time iterates once, when a package comes from the Dequeue).

    Then say, how can I control a young (timed by DAQmx device internal clock) loop of data acquisition of the structure of the producer of the event loop? As loop DAQ to start, stop, restart, etc...

    Thank you very much for the advice!

    You can certainly have several loops of producer.  Have a User Interface, loop driven events to send commands and a separate data acquisition loop to send data are not a problem.  Each loop has a separate queue. (You might be able to make it work with a single, but using two queues avoids many problems).  Often, I used a system of three loops long before that everyone was talking about calling it a producer/consumer.

    Lynn

  • Why do I get error 1122 to dequeue element loop of consumer when I hit the stop button

    When I hit the stop button in the vi, stops of producer loop, the loop of consumer gets an error and stops without having read all the elements and then my status check queue loop will continue to run because he never goes to 0.

    Any help?

    matt198717 wrote:

    I think that's what you were talking about.  If you have any advice or pointers for this VI please let me know.

    1. your consumer loop should use the Dequeue elements.

    2. your consumer loop should actually be freeing up the queue in the case.

    3. it is also useless for the polling stations see how many items is stored in the queue.

    4. your wait in the loop of producer should be that when there is no data in the buffer (you have it in the case of bad).

    5. do not use the value of the bytes to the Port reading VISA tell how many bytes to read.  Say you reading VISA to read more bytes that you always expect the message to be.  Let the stop character stop playback.

    6. use a VISA reading just after the initialization of your port to synchronize your messages.

  • Series read, store queue and time-evenly continues treatment, but the data is mixed now

    Hello, all,.

    I send MCU APR data to the PC via a serial interface, 16bytes each time interval of 50 ms, if I donot use queue, the data read visa are the same as sent. But reading and in turn within a while loop is not time efficiently as the multiple loops with queue processing.

    I have a byte (0 x 55) as the first byte of the data transmission, with multiple with queue loops, but now the 0 x 55 position is changed all the time, and most probably present at the 8th byte data.

    Thanks for any help.

    Ted

    Houde, dai wrote:
    [...]

    The data received with VISA read are unstable even without connection to the other party, as the screenshot displayed. [...]

    With best wishes,

    Ted

    Ted,

    What do you mean by 'unstable '? And I saw that in your simple loop VI, you are always empty the buffer after each reading, what you don't do in the loop number VI. Maybe it's the origin of the problem.

    However, IF the rinse, the root cause is not VI, but your connection (or the equivalent of your program). Since removes VISA Read already the amount of reading of data from the buffer, the data must be resent / captured again in the buffer...

    hope this helps,

    Norbert

  • Will be the leak memory for the queue when it is used in producer and mode of consumption data acquisition transfer different size table.

    In data acquisition, I use a loop to query the data from the hardware, another loop to receive the data from query sent by queue loop.

    Each time the size of the transferred data matrix is perhaps not the same, so the system can assign different table size and recycle frequently.

    It cost memory leak. Or it will slow down the performance, given that the size of the array is not fixed, so everytime need to create a new array of size.

    Any suggestion or the best method.

    If I understand your description, your DAQ loop acquires data with the parameter of the function of reading-'1 ' for reading at the DAQmx samples. This translates into different picture sizes.

    Passage of these tables directly to a queue is valid and she didn't mind important in performance (at least AFAIK) and it certainly does not leak memory.

    So the question is more or less:

    It is valid that the consumer receives sizes different picture for analysis? How your consumer manages these tables?

    hope this helps,

    Norbert

  • producer-consumer: optimize data acquisition rates

    I have a type of producer-consumer of application in which a single loop continuous waiting there and reads data from the card and another loop readings/backups of data. But besides a loop more trace data. The number of channels and real-time scanning is set by the user, the time it would take to save, view, and analyze each data block (an iteration of analog-to-digital reading) may vary according to different parameters.

    I'm putting 'number of samples to get' big enough on analog/digital playback to the beginning so I don't get the overflow of queue. Now I would like to adjust automatically when the program is running so I understand any overflow from the queue and at the same time the data are not exposed in the huge chunks at a time. Someone did he do this kind of thing before? For now, the only idea I have is to read the number of items in the queue at all times and use a mathematical formula to increase or decrease the number of samples.

    Abdel2,

    The number of items in the queue of streaming and using a mathematical formula to increase or decrease the number of samples is a good method. You can also use the decimate 1 D table function to display a smaller grouping your data if your problem is that you do not want to display huge chunks of data at the time.

  • Writing series visa delays

    Hello

    I use the LabVIEW Vi series to send commands to a DUT. I use the a Sparkfun USB to Serial converter cable for the interface, by connecting directly to the TX and RX pins of my DUT (an MCU). I am able to send and receive data without any problem or data corruption, it is really slow.

    There are up to a 5 second delay between writing the message get written in series VI write and actually see me this post to the MCU. I have a scope attached to the TX/RX signals to see when this happens. Fortunately I do only 2 entries of 4 bytes, so there is only an additional 10 seconds of delay, but with it, wrapped in a teststand sequence, delays will be added through hundreds of iterations.

    Anyone seen this before? Any ideas what I might be able to try?

    Thank you.
    Mark

    Well, the post was premature. A co-worker pointed out my mistake.

    I use 2 queues, one for reading, one for writing on the port series. The problem is that I use the VISA Read.vi timeout for reading queue loop and the Dequeue Element.vi for writing loop. By chance, I had configured the read timeout set to 10 s. Given that the serial port is the same VISA session, these are not truly independent of queue loops. the function Read series was blocking the write function of occurring for at least 10 seconds. Once playback Vi has expired, the writing was able to sneak in and get the message written.to the port.

    -Mark

  • Table of Build using Pseudo-file of waiting

    I'm moving to use a queue by simply creating a table.  I writing to a write DAQmx values in a loop at 50 ms, but I won't update the chart every 50 ms (for obvious reasons).  I use a global functional for transmitting data from a slower loop to 500 ms.

    Problem is that I get that each point of the tenth.  Y at - it an easy way to build an array and pass (without overwrite or skip data) to the slower without having to queue loop?

    Thanks for the help.

    Why not use a queue?  It is by far the most effective way to do what you want.

    What you have run in with the FGV is a race condition.  They you used it, it might as well be a local variable or a global variable.  FGVs do NOT prevent the race conditions in the way that you use it.  Here's a good article about the race conditions in the field of LabVIEW log:http://labviewjournal.com/2011/08/race-conditions-and-functional-global-variables-in-labview/

  • How to save the data of different rates in a single VI?

    Hello

    I tried to acquire 2-channel measurement of voltage at 10 kHz and analyze data, finally to save the data to both 1 kHz and 1 Hz. What I did is this loop of producer/consumer use to do the work of recording at different rates. I have queued all the data in the main loop, and then removed the data and write it to the file in other loops. I added "wait = 1 ms' a consumer loop for recording data at 1 kHz (loop of fast logging) and added" wait = 1000ms' in another loop to get the slow 1 Hz (logging loop) data record.

    My problem is that the data record works fine in the case of 1 Hz, but it does not work for the case of 1 kHz. Although the time-out period defined as 1ms, the interval between two samples in the loop of fast data recording is about 100ms.  Subsequently, 1ms, 10ms, 100ms, 150ms tried in this loop to see what intervals are in these cases. I found that the intervals are same as assigned in the timeout greater than 100 ms, but if the time-out is set to 1ms or 10ms, the intervals are again around 100ms.

    My question is - why I can't reach data record 1 kHz using loop of consumers/producers, while the same way works for the case of 1 Hz?

    Thank you very much

    Hao

    You are sampling at 10 kHz and you want to back up your data "as if you sampled at 1 kHz and 1 Hz", if I understand correctly.  I also understand that you use the design of producer/consumer model to help with this (a good idea).

    I'm assuming that the producer 'product' a segment of data at a time, to say the value of a second of data or a 2 x 10000 I16 (assuming a 16-bit integer A/D) table you put into a queue and wait for the consumer.

    If you have data at 10 kHz, how do you get representations to 1 kHz or 1 Hz?  There are (at least) two possibilities - average data over the interval of proper time, or (re) sample data.  The good thing is that you can handle the situation 1 kHz and 1 Hz, essentially at the same time and in the same processing loop.  I'll discuss the case 1 kHz - with the assumptions I made, the case of 1 Hz becomes almost trivial.  I'll discuss treatment also just one channel, as it is similarly almost trivial to go from 1 to N-channel.

    If you have 1 second of data sampled at 10 kHz, and will "reduce" 1 second of data sampled at 1 kHz.  Note that you have 10 samples for each data point that you want in the end.  The "Averaging" method said "Replace all 10 points in the average of these 10 points", while "resampling" method said "replace 10 points with, say, the first point, ignoring the others.  An easy way to do this is to use the Reshape feature to transform an array of 10 x 1000 elements of your array of 10000 items 1-D 2D.  Now, you can use a loop FOR an average of 10 items or simply extract the first.  [This is where almost everyone, including me, a mistake - when you put a 10 x 1000 2D array in a loop, you get 10 iterations of 1000 items and we want 1000 iterations of 10 items.]  Oops, what to do?  [Simple - converts 2D array before sending in the loop FOR.]

    So when you have processed your 10,000 points and got both 1000 samples "1 kHz" and 1 "1 Hz" sample, you write each of them in their respective folder and wait for the next item in the queue of the consumer.  Consumer focus on the queue loop, it will automatically 'block', waiting for the producer of the 'feed' some data.  Note that the producer generates data once per second, producing 10000 points for the consumer in the process, but the time to deal with these points and perform the required disk i/o should take only a few milliseconds (certainly not more than 100, even if writing to a floppy!), so you don't have much time to do other interesting things (such as display data).

    Bob Schor

  • How to do the sync with notifier

    Hi all!

    Now what I'm trying to do is to do a sync. A series of signal keeps coming back, and a counter records the number.

    And I also have a data acquisition to output voltages. Now I want that whenever the meter changes, a change in the production of data acquisition

    could be triggered. A synchronization problem! I would like to ask for help on the implementation of this. To use a declarant or appearance? and how?

    Someone has an idea?

    Thank you!

    Chao

    The screws you have found would be used, but when you select create options from the file menu, one is open one of several models of design pattern.,

    When you select new, a dialog box opens where you can select what you want to open. In the hierarchical menu on the left, expand the 'VI' section and the section she titled "from the model. Continue downhill expanding 'Managers' and finally 'Design Patterns '.

    In this final section, you will find a model called "model design of producer/consumer (events)." Select it and then click OK.

    This model uses an event (in this case an event on a button to change value) to do something (cause a value to be put in a queue). This basic idea would be expanded by first returning 'upside down' and then using a user-defined event to transmit information of change of State between the loops.

    In this scenario, the loop at the bottom (which is where your data acquisition logic would be) becomes the producer loop while the top loop (the one with the structure of the event inside) serves as the loop of consumer.

    Basically, the counter in your code generates an event defined by the user whenever the value of the counter changes. The event would pass this state change information to the consumer (instead of a queue) loop.

    I make this change because the question you should address with the help of queues and notifiers to synchronize is that only the consumer will see any given notification or the queue item. It's the way they are designed to work and it can be a very useful feature, but if you have more than one consumer who needs to be informed of a change of State, it is also a problem.

    On the other hand, an event will be seen simultaneously by all consumers who have registered to receive. Similarly, an event can spend as little or as much as you want.

    Mike...

  • Reading data from a queue - store quick loop, slow loop display

    Here's my BD below.  I'm data queues in a loop faster (100 ms or 50 ms) and by sending this data to a loop of 250 ms.  I need to be able to view the data in the slower loop (so that the public Service only is updated every 50 ms).

    Problem I have: How can I dump the data?  It builds and builds, and finally I'm looking at a chart that contains data that is old in 1 minute.  I tried to write my own code RAS (attached).  I tried to use variables to pass data and use a table to analyze... does not.  Any help would be appreciated.

    If you need all the data into the table, I use the RAS queue and write on the Blackboard in a loop FOR (autoindexing with the array of items in the queue RAS).  You can set the front reporter Panel updated before the loop FOR and reset it after, but I don't know who's going to buy you a lot.

  • Can someone tell me what's wrong with my loop of consumer queue or producer?

    A Labview engineer helped me with the overall structure of my program, made necessary by the rapid sampling rate data and post-processing requirements. He recommended the producer/consumer, loop and using one of the example (Cont CQI graph - int clk voltage) files to actual data acquisition. So I put the loop on foot and spend my two channels of data acq past in the loop of the producer. However, nothing is get picked up in the loop of consumer and none of my data gets displayed there.

    Someone wants to take a look and let me know what I am doing wrong?

    It seems that the only time where you have to write the data in the queue (in the loop of the producer), when you stop the DAQ while loop or the acquisition of data generates an error.

    You may need to place the element from the queue node in the data acquisition while loop.

  • VISA resources between the loops with the queue

    Hi all

    I am just be familiar with the queues and the producer/consumer model, and I am facing difficulties to pass data between the loops using queues, including data of the type "VISA Resource Name.

    Indeed, it seems impossible to cable "VISA Resource Name" as an entry of the item in the queue, as an output of the Dequeue item.

    These screws can I always try to convert something of this type can accept? Or should I take a different approach and that one?

    Thank you very much for your help.

    Florian


Maybe you are looking for

  • iPhone more replaced 6 speaker stopped working after update to iOS 9.3.4.

    iPhone more replaced 6 speaker stopped working after update to iOS 9.3.4. New speaker of iFixit. After replacement speaker works perfectly. With FaceTime, the call, music, etc. And IPhone running on iOS 9.3.3. But after the update to IOS 9.3.4 speake

  • What Toshiba Smat TV supports this DRM 10

    Hello, I am a developer with youngculture.I'm doing research for a client that supports DRM 10 what version of Toshiba Smat TV supports this DRM? If you can please answer. Thank you. Best regardsNikola.

  • Tecra 9100: How to enable the WLan switch?

    Hi, new here. I have trouble getting the Toshiba Wireless LAN Mini PCI Card to work. I installed all the latest drivers on the Toshiba site. It is activated in windows and the switch on the front of the laptop is on. 6 led is off.The FN + F8/Wireless

  • Start button / stop is stuck on Satellite P20 after pressing on it's too hard

    Hello I have Satellite P20 and pressed the power button to hard and now it's stuck in there.What happens now is when I power up it starts and closing. How can I fix the button, someone has any ideas? Best regards Anders

  • What do you do if you can't delete music off your MP3 player?

    I tried to remove music on my Sansa Mp3 player and it says that the directories are corrupted and unreadable and so it will not remove them. What should I do? I tried the videos, but they don't say anything on that there are problems with corrupted f