05-10-2019 03:12 PM
Hello,
I'm french so, sorry for my little english.
I have a hub who recieve 2 nodes.
I read it on Labview. Look's like that : ID;Temperature;Pressure
for exemple the node 1 who the ID is 43 : 43;25;10000
i can recieve only one by one. like this :
45;30;12000
45;26;11566
43;28;12569
45;31;15333
I put this on a database.
Now i want to see the temperature on a graph. BUT on the same graph in red (for exemple) the temperature of the ID 43 and in white of the 45.
I parse informations and take only temperature and ID and use it in a "case" in LABVIEW like pictures. But my problem is how can i show both in the same graph without a 0...
i'll try to explain : when ID is 43, the case return temperature for the 43 but a 0 for 45 so on the graph it's not good ... and vise versa when it's 45.
So 2 solutions :
- Take the last value when it's 0. if it was 25, take 25 and not 0. but if it was a 0 before the 0, take the last value who was not a 0.
OR
- Try to wait the bundle recieve 2 data <0 before the chart read it.
But i don't know how to do it ...
can you help me please guys?
thx a lot
05-10-2019 04:03 PM
Can you attach the VI of what you have so far? I think I understand your question but it's not very clear to me how the attached images are related.
05-10-2019 04:07 PM
hi,
the data into the read buffer are like that :
ID;Temperature;Pressure
I have 2 nodes with ID 43 and 45.
when i recieve the data of the node 43 i read :
43;XX;XXXX
so i parse them to have only ID and Temperature.
Then i want to put mean of 5 measure of temperature for ID 43 and 5 for 45. but how ...
is it more clear ?
sorry i don't have a higth level in english
05-10-2019 04:09 PM
I'm not quite sure I understand but I think what might help you is that if you have a graph and you don't want to plot some of the numbers such as 0 you can replace the number with NaN and the graph will not show that point. I have done this in the past and it worked well for me, I did not want to see the zero values.
05-10-2019 04:14 PM
i just creat a constant and write NaN?
or string ?
05-10-2019 04:17 PM
@MichaelS78 is correct -- when you plot something, all of the data must have the same properties, which include point size, point color, line type, etc. If you want some points with one property and other points with another property, you must plot the data twice, once with Property 1, once with Property 2. To avoid plotting a point, replace its value with NaN (a special value that is defined for Dbls, but not for Integers, so if you are plotting integer numbers, you'll need to copy them to Dbls (safe) and using the NaN "trick" to delete the points you don't want to see.
Bob Schor
05-10-2019 04:19 PM
i will try it on monday.
thank's a lot for help.
i will tell you if it works proprely for me 🙂
have a good weekend
05-10-2019 05:24 PM - edited 05-10-2019 05:24 PM
05-11-2019 02:28 AM
Hello, Thx for the help
I code something simple. (look screens)
once is the ID 43 and once id 45. (depend of the random number)
But someone tells me to put NaN in the other case to "bypasse" the 0 value : but it write "2147483647"
Can you give me some help to bypass please?
Like what? what's an unbroken code?
I will use "mean ptbypt" 🙂 thx.
05-11-2019 11:31 AM
I refuse to look at pictures of Block Diagrams. You've previously been asked to post your VIs, as that saves us Time and Energy, and lets us immediately test your code.
Attach VIs.
Bob Schor