06-04-2012 10:54 PM
The value "DDD8DED5EC" is a junk value that the VISAread is getting.The read is not getting the value that writes in the write continuously.vi.The connections and all was OK.
Also termchar is provided.And the bytes read is changed to 50.Again it is showin errors.How can we fix this issue?
06-04-2012 11:26 PM
There is no way that one serial port is receiving data that is different from what the other is writing if you have a null modem cable between them and all the settings match like your VI's show.
I suspect you have a serial port problem.
06-04-2012 11:31 PM
Here is my VIs.Can you please pointout whether it has any problems?I checked the serialport with another example,it is working fine.
06-04-2012 11:58 PM - edited 06-05-2012 12:02 AM
I don't understand your changing array VI. You are generating random numbers and the dividing by 255 after adding them to existing numbers in the feedback node. That means you get very little variety in your actual data since the random numbers are going to be either a 0 or 1 depending on the way things round. The data it creates looks nothing like the data you have saved as default in your array indicator on the writing VI.
Also, your writing VI just takes that data and never appends a new line character to the end of it before writing it out to the serial port.
I think you need to scrap what you are doing entirely with these VI's. They make no sense. If you "check the serial port with another example and it is working fine", then I suggest you start working with that example as a basis and do some programming with that that makes sense rather than these illogical things you are trying to do to fake data. The "junk data" you are getting in your VISA read makes sense because you are pretty much generating junk data in your changing array VI. Get rid of that subVI completely.
06-05-2012 12:10 AM
I don't understand your changing array VI. You are generating random numbers and the dividing by 255 after adding them to existing numbers in the feedback node. That means you get very little variety in your actual data since the random numbers are going to be either a 0 or 1 depending on the way things round.
I want a continuously changing input array.Thats all with that subVI.
I made the array in write continuously.vi as "\ code display",that array is automatically changing so how to make them appends a new line character to the end of it before writing it out to the serial port??
Get rid of that subVI completely.
If I get rid of the subVI,then how I can give a continuously changing input?What I actually need is a changing input array in one VI and an output array showing that change in another VI.All these have to be done through serial port reading.
06-05-2012 01:18 AM
If we have enabled the "\ code display", for a continuously changing array,is it capable of attaching the endline character(\n) to all the changed values automatically.If not how to make it possible?
06-05-2012 01:40 AM
LabVIEW does very little automatically in the sense of manipulating strings. You either program explicitedly in the diagram that the string should be altered or it does not get altered at all. The \ Code Display does NOTHING to the underlaying data at all, but simply changes how that data is displayed. There is ABSOLUTELY nothing else the Display options of a string does!
Go through the LabVIEW tutorials and learn what they tell you. This question and answer game in the forums, obviously has no effect for you, as your questions remain clueless from the start of this thread, (and other threads) to the very end! You are going to be the first Forum member breaking through the 1000 posts limit by only posing questions and never giving answers in a matter of months if you continue like this.
I'm done with this thread. Unsubscribing to it!
06-05-2012 01:58 AM
Have you ever checked the attachment in #103 post.I can't able to read from the array from the write continuously.vi.And Iam trying to fix that error.I can successfully read from the array if it is not changing.So.in my previous post I just asked is the problem lies with (\n)?,as Ravens Fan asked me:" Also, your writing VI just takes that data and never appends a new line character to the...
06-05-2012 02:26 AM - edited 06-05-2012 02:27 AM
I did and it's not funny. Your changing array.vi is totally senseless, creating in each iteration a different array therfore forgetting in each iteration any previously created array, and never adding any line feed other than by accident once in a while.There is no way you could receive an array of strings in such a way. The least you should do is taking the changing array.vi outside of the loop, and make sure to add a linefeed before sending each string off. And if you had followed the LabVIEW tutorials you would know that by doing so you could use auto indexing for arrays on loop bounderies too.
There are still fundamental problems in understanding serial communication, LabVIEW programming, and generic programming logic all at once in those VIs, much of that having been discussed several times in this thread alone. I could understand someone coming in this thread by chance not knowing everything what has been discussed before in it, (and not feeling like wading through all 110 or so posts from which half of them show nothing but ignorance) but this is YOUR thread and you have repeatedly shown to not read, listen and/or understand what others tried to tell you here.
06-05-2012 03:43 AM
I did and it's not funny. Your changing array.vi is totally senseless, creating in each iteration a different array therfore forgetting in each iteration any previously created array, and never adding any line feed other than by accident once in a while.There is no way you could receive an array of strings in such a way.
This means we can't read a continuously changing array from another VI.Isn't it?
I put the changing array.vi outside the loop and I added a linefeed before sending each string,but nothing read in the output array.
Thanks for the patience.