LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

16 bit receive over rs 232

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

0 Kudos
Message 21 of 31
(2,087 Views)

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.

0 Kudos
Message 22 of 31
(2,090 Views)

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

0 Kudos
Message 23 of 31
(2,085 Views)

This is the method using Join numbers.

 

0 Kudos
Message 24 of 31
(2,078 Views)

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

0 Kudos
Message 25 of 31
(2,072 Views)

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.

0 Kudos
Message 26 of 31
(2,068 Views)

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

 

 

0 Kudos
Message 27 of 31
(2,061 Views)

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 

0 Kudos
Message 28 of 31
(1,992 Views)

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.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 29 of 31
(1,971 Views)

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.

0 Kudos
Message 30 of 31
(1,843 Views)