02-27-2013 05:11 AM
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.
02-27-2013 05:14 AM
What input you are receiving and what output you are expecting ?
Specify that better
02-27-2013 05:28 AM
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
02-27-2013 05:36 AM
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.
02-27-2013 09:32 AM
@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.
02-27-2013 10:00 PM
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
02-27-2013 10:57 PM
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.
02-28-2013 03:03 AM
how can I do that can you send me a snippet or sample , or steps to do. Please help me.
02-28-2013 04:02 AM
Do you want to stop the graph or keep on running with same value when condition is true ?
02-28-2013 04:21 AM
Try to take some reference from this..
Let me know the result