08-18-2011 07:02 AM
Hello,
First I apologize for not seeing that network streams are new feature of LabVIEW 2010. I found link regarding sending array of strings throught TCP: https://decibel.ni.com/content/docs/DOC-6641
To be able to use this in your system you need to convert you array of doubles to array of strings, and then send/recieve it like it is described is the link.
The connection of error wire i correct. To fix please try few thing: set timeout of the stop variable in cRIO.vi (the one you write false) to 3000 milliseconds, change of Variable1 few times bigger and change buffer size of Variable1 to few times bigger number. If after this still does not work, try enabling RT FIFO on stop variable to single-element
The control of sampling rate in the computer VI needs to be in while loop, so it is updating data each iritation. The variable must not be buffered and RT FIFO need to be single-element.
Input node sets the settings on the start of the timed loop; with right data node you can change setting between the timed loop in running.
Best Regards,
Gregor Cerne
National Instruments
08-18-2011 07:06 AM
Right,
This should work, it is completely untested though, and I have never down converted files before so I have no idea how far this will get us!!!!
The files you will want to use are in the 2k9 folder.
Dom
08-18-2011 07:20 AM
Sorry how come when i right click on the Stop variable, there's no option saying "show timeout" ?
08-18-2011 07:27 AM
Is this aimed at me or Gregor?
08-18-2011 07:30 AM
Sorry that message was to Gregor regarding one of the suggestion he has made previously.
Thanks for your code!! Because I have close to 0 knowledge about TCP, I shall go check out Gregor's link about TCP first and build some basic knowledge before I can understand the VI you provided. Thanks a lot ! I really appreciated your help!!
08-18-2011 07:32 AM
I have also just realised that on my PC VI, I haven't wired a proper stop, you will need to do this or kill the program.
The VI's I have sent to you are a kind of proof of concept, they should work, if they do then we can build in the rest of the functionality as we go.
08-18-2011 07:33 AM
Hello,
I deeply apologize, I mixed up few things together - there is no way to set the timeout for writing into variable. Please skip this step.
Best Regards,
Gregor Cerne
National Instruments
08-18-2011 08:00 AM
@ Gregor,
Because I previously set variable1 to be a single process variable, it does not enable buffering, if I change it to a network variable and enable buffering, it still doesnt solve the problem, plus it creates another problem where the display of the timestamp on the computer.vi doesnt go smoothly. Maybe I should implement your previously suggested approach for the stop button but can yours be modified in such a way that the stop button displays on the computer.vi rather than cRIO.vi? Thanks!
@Dom I 'll start looking at the VI now and hopefully I can get back to you soon! Once again thanks a lot!!
08-18-2011 08:15 AM
@ Dom, I have just tried to run your provided VIs on my project and I have got an error message, which reads :
Error 74 occurred at Unflatten From String in PC VI.vi
Possible reason(s):
LabVIEW: Memory or data structure corrupt.
And for the cRIO TCP VI.vi, was I supposed to perform the instructions given about removing the code disabled structure code?
08-18-2011 08:40 AM
The instruction to remove the disable structure was purely so you could test it on your cRIO with your data once we have sorted the streaming out....
I'll have another look, unfortunately my cRIO's are otherwise occupied at the moment, but I'll get back to you ASAP.
Dom