03-02-2016 11:37 AM
My labview is 2011 and VI snippet is from 2015. Hence it is not working in mine. Is there any way u can help me. If it is too much trouble, I can check one by one one and find which one it is. Thanking you.
03-02-2016 11:43 AM - edited 03-02-2016 11:44 AM
I updated my snippet to 2011, but I'm guessing you weren't talking to me since my original snippet was 2012, not 2015.
03-02-2016 12:07 PM
Um... Okay you do not have the exact same VI's I used, (wirete to and read from Delimited Spreadsheet file)
The VI's you need are Write to Spreadsheet file and Read From Spreadsheet file (in the File I/O Palette)
The rest are in the Array Palette.
03-03-2016 04:25 AM
HI aputman,
Thank you very much for updating to 2011. I have used ur snippet and it works except for 1 small error. I dont know why is this happening. Can you please help me. I have uploaded the snapshot. Thanking You.
03-03-2016 04:51 AM
That error shows that whoever you are trying to talk to is not listening. You need an application on the other side looking to make a TCP connection.
03-03-2016 06:45 AM
Hi crossrulz,
I have already done a program to send data over tcp connection. So if I use this code in that will it work. Is that what u meant by having an application. Thanking You.
03-03-2016 07:00 AM
@vindsan wrote:I have already done a program to send data over tcp connection. So if I use this code in that will it work. Is that what u meant by having an application. Thanking You.
But is it on the computer with the IP address you are trying to connect to and running at a state where it is waiting for a connection as a listener?
03-03-2016 07:21 AM
Yes it is on the computer
03-03-2016 09:12 AM
Why are you opening up the same configuration file twice and reading and writing to it at the same time?
You have a race condition. You have no control over which path of execution occurs first. So the data you are reading may be older than the data that you are just writing in.
03-03-2016 09:15 AM
Don't use my code exactly as I posted it. I was only showing the relevant bits on how to read and write to an INI file. You'll need to implement that code into some logical system with maybe an Initialize state where you load your config values from the file, a Connect state where you take the IP and port and store the connection to your listener, and any additional states where you communicate back and forth, and then a Close state where you close the connection and end the program. Don't read and write to the INI at the same time, doesn't make sense.