Wrong Counting

First, please have a quick look at the VPL diagram:

www.ie.bgu.ac.il/kartoun/microsoft/pics/VPL_Count_Down.JPG

While trying to run the counting down program, I encounter a weird output; sometimes the program runs properly and says: "ten, nine, eight and so on till zero, all done" and sometimes it says "ten, eight... zero... all done, nine" or other wrong counting.

Have you ever encountered such a situation?

Thanks!

[623 byte] By [UriKartoun] at [2008-2-7]
# 1

In VPL everything that is not explicitely sequenced can happen in parallel, to solve the issue and maintain ordering you have to make the loop dependent on the response SayTextSynchronous action of the TTS activity, i.e. add a join to the connection that loops back and feed the response of the action into the join.

Hope this helps,

Andreas

AndreasUlbrich at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...
# 2

Andreas, can you please be even more specific?

It still doesn't work (although it is supposed to be a very simple issue).

Thanks,

Uri.

UriKartoun at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...
# 3

Hi Uri,

The problem is that the branch of your diagram from the merge to the top TextToSpeech block happens concurrently to all other processing and the VPL runtime doesn't guarantee order of execution of concurrent blocks so the numbers will be said out of order. If you structure the diagram such that the counter is not decremented until the number has been passed to the TextToSpeech service and a response received then you can guarantee the order of execution.

Hopefully the following ascii art will make this clear...


Code Snippet
+-Data-+ +-If+ +-TextToSpeech-+
| | | | | |
+ 10 +O+ value == 0 +-SayText-+ "All done!" |
| | / | | | |
+-int--+ | | Else +. +--+
| + \ \
| \ \ +-Join-+
| \ \ | | +--Calculate--+
| | `-+ Counter | | |
| | | ++ Counter - 1 +-.
| | .+ Success | | | |
| | / | | +-+ |
| | | ++ /
\ | +-TTS+ | /
\ \ | | / /
\ '-+ value +-' /
\ | | /
\ +-+ /
\ /
''

Hope this Helps

Paul

PaulCRoberts at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...
# 4

Hi Roberts:

Can you tell me how to "Draw" a picture like you shows "upstairs".I means is there any easy way to draw this picture ? Because it's hard to find a place to storage picture."text - picture" may be a good way :-P

Thanks.

Tan Wangda

HustWugui at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...
# 5

Hi,

Unfortunately we don't currently have a tool that produces diagrams like that, although it is a good suggestion. I just used notepad...

Cheers

Paul

PaulCRoberts at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...
# 6

Hi Paul,

It works, see:

http://www.ie.bgu.ac.il/kartoun/microsoft/pics/vpl_count_down_works.jpg

Thanks,

Uri.

P.S. I wish it would be possible to upload images/documents to these forums.

UriKartoun at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...
# 7
I found an excellent free ascii art editor at http://www.jave.de/.
ReeceR at 2007-10-3 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Visual Programming Language...

Microsoft Robotics Studio

Site Classified