01-23-2012 01:39 AM
HI YAMAEDA!!
YES IT CAN BE POSSIBLE TO SEND IN 512MS , THERE IS NO PROBLEM IN THE SEND TIMMING,
but, in reading time, will be exact, every 32ms we must read the information.
apart from that i must be reading information also from the other pc every moment if this is posible!!!
but can be possible to be reading everymoment???
01-23-2012 02:49 AM
I would do the following: Create an Action Engine for your data with the commands Init, Add, Read&Clear
In a 32ms loop, get data and add to AE with Add.
in a 500ms loop, Read&Clear from the AE and send it through tcp/ip. (basically the same code as now)
Dont worry about the reciever, it will react when it gets a signal.
Try it, you're already 80% done. 🙂
/Y
01-23-2012 05:13 AM
Action Engine Example in here: http://forums.ni.com/t5/LabVIEW/Action-engine-help/m-p/1319135/highlight/true#M540001
I think Darren wrote an excellent nugget on AE's, but i couldn't find it right now.
You _can_ use queues, but i dont think you _need_ to use them. 🙂
/Y
01-23-2012 05:47 AM
yamaeda!!!!
i think i have improve alot the programmm!!can you atch it??please!!!!
only in the client i see the arrays but sometimes i have an empty array that i don't want to see how can i quit it??
thanks for all!
01-23-2012 06:23 AM
I removed the queue and made an AE. Look at the attached ideas.
/Y
01-23-2012 07:01 AM
but they don't work properly, i cant send to the other pc, and in de servidor program if you executate highlighting you can see that gives error 56...but i don't know why...
thanks!
01-23-2012 07:45 AM - edited 01-23-2012 07:55 AM
You have a 3 sec timeout on the TCP listen, if your client hasn't started by then you'll get error 56. Just set it way higher, like 60000 (or-1?)
I just noticed a bug. You send a 1D array, but you try to recieve a 2D array. Remove a dimension in the client and it'll work.
/Y
01-23-2012 08:03 AM
i don't know...your prgram only reads one time, the first an then after that it stopeed and mantains the same value for the rest of time....
01-23-2012 08:15 AM
@alan4 wrote:
i don't know...your prgram only reads one time, the first an then after that it stopeed and mantains the same value for the rest of time....
Yes, the file reading part is your construct. Since it reads the file outside the loop it'll have the same value.
/Y
01-23-2012 08:20 AM
thta's right is my part of the program...but when i have send to you the programs with queues...the line i read, was the same but the time in ms was changing all time..and in your new program no...so whats the problem, i think is in the action engine...