07-20-2005 12:59 PM
07-21-2005 06:37 PM
Hello Mike,
Thank you for contacting National Instruments. 2D arrays are not supported by RT FIFO's. Please refer the following links - The first link explains what data types are not supported and has a couple of tutorials explaining how to use LabVIEW RT Communication wizard. The second link explains how to share strings using RT FIFOs. Hope this helps.
Regards,
RMM
http://digital.ni.com/public.nsf/websearch/2478C5CCC53E460186256D63003DE388?OpenDocument
http://digital.ni.com/public.nsf/websearch/4C0DD3F01279A34286256F86007F031A?OpenDocument
07-22-2005 08:08 AM
07-24-2005 02:51 AM
If you are already going that route, you're probably better off doing it inside LV.
There are several examples (and tutorials on this site. Search for "TCP tutorial" or "TCP fieldpoint") which show how to work with TCP between a PC and a FP. You can have a loop which will pass the data from the PC to the FP either by flattening it to a string or by using datasocket. This would definitely be better than going the FTP way.
07-25-2005 07:51 AM
Thanks for the response, but does it mean I don't have to flatten the array to a string if I use a datasocket?
I guess I should explain the application. I have a two loops that run in the PC. One that does ethernet to a scope & DMM, and another loop that does ethernet to my Fieldpoint rack where I control about 8 inputs & 50 outputs. The outputs are set from a 2D array that starts out as an Excel spreadsheet table. Performance is O.K., but I was hoping to get the Fieldpoint I/O to update a little faster by moving the FP loop from the PC to the FP controller. The only stumbling block is getting this Excel table in there.
Flattening it and then rebuilding it would be tricky, because I can't be sure that there would be an element in every cell, every time. I don't have to transfer the Excel table often - only at the beginning of each product tested - about once every 10 minutes. That's why I was hoping to transfer it in intact.
That's why I was thinking that I could have the LV program in my PC FTP the Excel spreadsheet into the "C:\" space of my FP2010, then the read spreadsheet vi I'm using now in the PC would run in the FP2010 and grab the table.
07-25-2005 08:25 AM
The good thing about DS is that it is transparent. You set something to publish in one place and you subscribe to it in another place. No need to handle the communication. The downside is that since you have less control.
As for the other method, flattening to a string (using the flatten function from the Advanced>>Data manipulation palette) does not cause any change in the data. When you unflatten the data, you simply need to supply the correct data type (in this case, probably a 2D DBL array) and you get the original data.
Look at the examples - for example, simple data server\client. It uses typecast instead of flattening, but that's irrelevant. Look at how it passes the data - first it sends the string length, then the rest of the string. On the other side, it reads the string length and uses that data to read the string and convert it back to the original data type - no data lost.
If you want it to be perfectly reliable, you should also have some means of periodically checking to see that the connection is still alive, and if it isn't (let's say a mouse ate the cable), close it and reopen.
09-12-2005 09:24 PM
Tst,
Thanks for the response.
Another question along the same lines. From what I understood from your previous post, in one EXE I've built I can read the spreadsheet data into an array and then flatten the array into a string (using Flatten to String.vi), and then datasocket it to another EXE that I've built and turn it back into the spreadsheet array (using Unflatten from String.vi)? Is there a size limit to the amount of data I can transfer in that flattened string through the datasocket? (My spreadsheet is 256 rows x 26 columns, with a mix of mostly text and some FP values)
Thanks in advance for your advice,
Mike
09-14-2005 05:15 PM