From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ploting RS-232 communication received data

Solved!
Go to solution

Hi GredW,

I have asked a qustion, and have been given an answer. But this question is a one other thing I need to make a project work.

My first question is why some waveform charts arent plotting data while others are. My second question is how to make a conversion of a 32-bit data ( I have a 24-bit useful data, and I add another 8-bit zero data, to make it a 32-bit). Now I have tryed your suggestion, but it only turns 32-bit data to 64-bit data. And I need to turn 32-bit to digital waveform format, because "Digital to Analog.vi" works only with - digital waveform format.

 

Thank you for answering.

 

Darko

0 Kudos
Message 11 of 16
(1,610 Views)

darko_36 wrote: My second question is how to make a conversion of a 32-bit data ( I have a 24-bit useful data, and I add another 8-bit zero data, to make it a 32-bit). Now I have tryed your suggestion, but it only turns 32-bit data to 64-bit data.

Were we looking at the same code?  GerdW's code from message 8 takes a single 32-bit number and converts it into the actual voltage you are looking for.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 16
(1,604 Views)

Hi Darko,

 

you asked for "I need to convert the 24-bit data digital to analog data before the ploting," And my snippets creates the analog data you were asking for.

 

Can you PLEASE supply an example (VI) with an input and an output you are looking for?

It's unclear for me why you want to convert digital data to analog for a digital display!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 16
(1,595 Views)

Hi GredW,

I'm sorry, english is not my first language, this is probably the reason for misunderstanding. OK so this is the goal.

I have a DSP that collects data (24-bit data), and sends it to my computer using RS-232 communication. RS-232 sends 8 bit data, so in my vi you can see I am using "Join Number" block to turn them back into 24-bit data. 

So the problem here is my DSP uses a AD converter to collect data, so I have turned the analog value into 24 bit digital value, and after collecting data I am sending the data in this format to my computer. So my goal is to turn this data back into analog form so I can plot it, because, if ploted the converted 24 bit data can't show the real analog value.

So basicly if my DSP gets V1 on the AD converter, this V1 is turn into a 24 bit data. According to the conversion table attached if V1=Vref, then the 24 bit data is 7FFFFF. And then DSP sends the converted data to my computer, and if I try to plot this value I am ploting 8388607 value because 8388607(10)=7FFFFF(16). What I want is to turn this 7FFFFF into Vref, so I can plot that value.

 

I hope I am have cleared the misunderstanding.

 

Thank you for your patience.

 

Darko

0 Kudos
Message 14 of 16
(1,585 Views)

Hi darko,

 

then use the snppet I provided before. It will turn your 24bit number into an "analog value" proportional to your Vref…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 16
(1,574 Views)

Hi GerdW,

 

Thank you!!!

 

Darko

0 Kudos
Message 16 of 16
(1,535 Views)