08-24-2010 08:33 AM
Hello,
Also, I thought by giving offset to the string subset block as 1, I will be able to read the second string but I am not getting the result as expected., Can you kindly tell me whats wrong here plz? Attached is the vi.,
- Nagaraj Hegde
08-24-2010 08:34 AM
Take your string and feed it to a String to Byte Array function. Index out the first two elements of that array and pass them to the Join function.
08-24-2010 08:53 AM
Hello,
Attaching the VI., I believe I have done as suggested by you. But I am reading same string in both outputs of the index array function., Can you kindly look at the vi once and correct me plz..
-Nagaraj Hegde
08-24-2010 09:08 AM - edited 08-24-2010 09:09 AM
This is the method using Join numbers.
08-24-2010 09:23 AM
I am so sorry but thats what I told in my last mail., Both the numbers from the index array function are same:-(
Say for example I transmit 0x5786 from the instrument, I am getting the combined number as 34438 which is 0x8686.,
I don't understand where I am getting wrong..
- Nagaraj Hegde
08-24-2010 09:35 AM
Nothing in the LabVIEW code should be causing that. Have you put an indicator or probe on the output of the VISA read to see what that says? Try using NI-SPY to see what is happening at the serial port at a lower level.
08-24-2010 10:36 AM
Hello,
Thanks for pointing that. I got to know about the problem with my sender., I have fixed it now and its working great and thanks a lot for all the help.
Best regards,
Nagaraj Hegde
08-30-2010 07:52 AM - edited 08-30-2010 07:55 AM
Hello,
I want to know one information:
When I create an exe of the VI using Labview which uses the VISA drivers for com port, do I need to install the VISA drivers in the machines where the exe will be used?
-Nagaraj Hegde
08-30-2010 08:04 AM
Yes the host machine need to have a copy of the VISA runtime system. You can build an installer which will include this so VISA is installed at the same time as your program. You will find VISA runtime on your driver disk(s), or download it from NI. It does not matter if you include it in an installer. Or install separate.
01-07-2011 03:50 AM
Hello,
I am also working on the same project and from this discussion i have developed a 16 bit receiver but the problem is that it interprets the LSB and MSB incorrectly. Also that, if it starts correctly at the begining than sometimes interchange the Bytes it in the middle of the program.
Here i completly explains my project.
I have an analog signal which is digitized through my 12 bit ADC and is serially transmitted to the PC through RS232, Here i have to view the signal similarly as it is generated with its exact parameters of amplitude and frequency.
Problems
1- LSB and MSB are interchanging each other every time. Even between the program.
2- Data is displayed on the chart as a variable against time. But the parameters are not evaluated.
Solutions in my mind:
Definitely i have to decode the bytes so that it may differentiate the MSB and LSB. I have the advantage that i am using 12 bits so that the upper nibble can be used to decode the MSB and LSB.