LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i avoid zeros in my program output

I 'am attaching one Vi in which I 'am sending a command +/-500\r\nZ To a motor through serail port write. So when the signal from the daq is not equalent then the motor should stop but it should not read zero in graph. When ever the signal becomes true the graph should start and continue from the previous position. I tried a lot ways but failed please help me.

0 Kudos
Message 1 of 10
(2,800 Views)

What input you are receiving and what output you are expecting ?

 

Specify that better 

--------------------------------------------------------------------------------------------------------
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 2 of 10
(2,798 Views)

input is +\-number \r\n Z. This is to read the numeber of steps. but when the program stops or true case fails the graph stops when the true case agin comes then the graph starts from zero what I have to do to avoid such a problem

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

Its bit confusing but what i understand is if you want to count number of steps from +200 to -200 then 0 should be included.

 

 Lets say you dont want to start again from 0 then use one case structure with when first time then add 0 as offset(Becasue this is first time it is true) and otherwise add some number to that so that it wont go to 0 again.

 

 

--------------------------------------------------------------------------------------------------------
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 4 of 10
(2,783 Views)

@perumpadapu wrote:

input is +\-number \r\n Z. This is to read the numeber of steps. but when the program stops or true case fails the graph stops when the true case agin comes then the graph starts from zero what I have to do to avoid such a problem


You have been told several times to NOT do an equal comparison on floating point numbers. I don't understand why you keep trying to do that.

0 Kudos
Message 5 of 10
(2,761 Views)

I need to continue the graph from the point it stops as the case becomes true. This is my interest. can you please help me in this regard

 

0 Kudos
Message 6 of 10
(2,733 Views)

Next time it is TRUE what value that time you are receving. I told before also. Read the value when it is TRUE and store in local variable. Next time use this as offset.

--------------------------------------------------------------------------------------------------------
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 7 of 10
(2,723 Views)

how can I do that can you send me a snippet or sample , or steps to do. Please help me.

0 Kudos
Message 8 of 10
(2,706 Views)

Do you want to stop the graph or keep on running with same value when condition is true ?

--------------------------------------------------------------------------------------------------------
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 9 of 10
(2,697 Views)

Try to take some reference from this..

 

Let me know the result

--------------------------------------------------------------------------------------------------------
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 10 of 10
(2,688 Views)