05-03-2012 01:49 AM
As VISA can accept string buffer only,how can we connect a 'table control with VISA?
Solved! Go to Solution.
05-03-2012 03:49 AM
You mean to Visa Write? And if so that depends on what your remote side expects. You could for instance extract the table content and format it into a Spreadsheet string with the Array to Spreadsheet node. Or maybe you need a different format that you could build inside one or two loops with a shift register.
But there is no generic way to do what the title says, because it will always depend on what the remote side expects.
05-03-2012 04:02 AM - edited 05-03-2012 04:07 AM
Thanx for reply.What Iam trying to do is to read a table from one port(COM3) and display it in another port(COM4).Both ports are connected using prolific USB-to-serial COM port(a cable).VI is attached below.
05-03-2012 04:07 AM - edited 05-03-2012 04:12 AM
Edit. What are you trying to do? You receive a string and nothing but a string per read. Why do you want to display that string in a table? Simply use a string Control and forget about String to Bytes and Typecast and vice versa altogether.
05-03-2012 04:09 AM
Sorry I edited the attachment.Please check.
05-03-2012 04:16 AM
Actually trying to read the contents in the table(now it is empty) and write it as a table itself.
05-03-2012 04:32 AM - edited 05-03-2012 04:34 AM
But you fill the table with a (not working) conversion from a VISA read first. So what are you trying to do there? I do have a hunch that you try to display each indivual byte in one row and one row per loop iteration but that would require a complete remodeling of your code and the use of a shift register to maintain a history of the previous reads. Also you most likely wouldn't want to write the entire table with all previous strings on each loop iteration either, so the idea to use the table to hold the data between the read and write is completely flawed in the first place.
Not knowing what your final intentions are with this it is absolutely impossible to give you good alternatives to what you have now. The only thing I can say with 99% probability is that what you have now is not what you really want.
Also there doesn't exist something like a universal representation of a table in string form. The closest to this is a spreadsheet string, but that can be with tab, comma, or whatever seperator and various number formats.
05-03-2012 04:37 AM
Hello,There is an example in Labview2009 named '2 port serial read and write'.In that example I successfully read and write a string.And now Iam trying to read and write a table instead of the string buffer.
05-03-2012 04:39 AM
and what is the format of that table you want to read?
05-03-2012 04:43 AM
Format?I dont understand cleary?If a simulator in the form of a table(VI attached).