LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sirial port read save saparat and graph PLEAS HELP

hi to all i am new to labview so sorry if what i ask is silly. i am trying to recive data from a sirial port and saving it into a file (that part is working) but part of the data is the friqwancy (wich i need to show saparatly) and the rest is the signal sampaling so basikly im trying to saparate the friqwency from the rast of the data. problem number 2 is that i wont to show the sampaled data in a waveform graph but all i managed is a chart this becouse i get avry sample at a time. pleas help

0 Kudos
Message 1 of 10
(3,211 Views)

Any one ????

0 Kudos
Message 2 of 10
(3,189 Views)

What is the format of data you are receiving. Paste your sample data.

If you want to seperate the frquency from rest of the response then see data you are receiving in string form and if you know the position of frequency in the response then by using string subset read the frequency. What is the problem ?

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 10
(3,183 Views)

I am reserving binary 8 bit data each time ,,, the firs data representing the frequency and then the rest is representing the voltage of each sample, I don't know how to separate the frequency as and  I wont to show my data in a graph and not a chart which you can see in my vi. But since in the while loop the graph gets only one value every sickle and I can't show a number of samples

0 Kudos
Message 4 of 10
(3,174 Views)

Hi alex,

 

you have to read the manual of your device to know how the data is formatted that you receive via serial port! No one else can do that...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(3,171 Views)

Yes I know. But I do receive now data from a simulation and I understand that I need to do some kind of a shift register in order to store data normal because now I receive a value at a time... So all I can do is a chart and not a graph which I wont So if possible  to help me with the shift register.

The frequency is something I will be able to get out of the shift register if I manage to create it.

IM attaching my vi which now has no shift register

pleas help me with the shift register

0 Kudos
Message 6 of 10
(3,163 Views)

Hi alex,

 

you already have 3 shift registers in your VI. On of them is collecting data in a string array.

Is it that hard to create a 4th shift register and to copy the relevant code to collect data in the register?

 

If it is you should do the 101 courses offered by NI...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(3,160 Views)

It does not appear that it is possible to separate the frequency and voltage data unless there is information you are not providing. We have no idea what the data actually looks like but there would have to be something (i.e. a prefix) that identifies a packet as voltage or frequency. Contact the vendor of the serial instrument, read the manual, and if confused, post it. If there is no identifier in the packet, you simply cannot know which packet is which because your acquisition is completely asynchronous with the transmission from the instrument. No way to tell the order of the packets received. That would be the fault of whoever designed the serial instrument and it should not be used.

0 Kudos
Message 8 of 10
(3,140 Views)

There is a notify but because I get one "sample" inside the while loop at a time and somehow can't see the proper array (thetas why I can't do the graph only the chart) I can't separate it. So the proper question is how I can make my data shown in a graph (then some kind of SST compare will take out the frequency ) besides the graph is needed

0 Kudos
Message 9 of 10
(3,124 Views)
If you know how to separate them, then do so and have two separate shift registers. With a case statement and a build array in each, you can increment the appropriate shift register. Though I fail to see why a graph is needed. A chart would display two separate traces just as well.
0 Kudos
Message 10 of 10
(3,115 Views)