10-02-2014 07:59 AM - edited 10-02-2014 08:02 AM
I have a boolean button, "Relay Power" that the user presses to start a pulse train.
There are two types of pulse train options: single and continuous.
My logging is dependent on the state of 'injection' and 'relay power'
When "Injecting?" goes FALSE and 'Relay Power' is TRUE, my logging starts. In the continuous case, when 'Injecting?' goes TRUE, the logging stops.
In my single case, the 'Injecting' never goes TRUE again since it just runs once. I think I would like my 'Relay Power' to go 'False' / unlatched when the pulse is over.
How do I achieve this?
10-02-2014 08:45 AM
The local variable can be a read or a write. I think what you want is to make a new local valiable that is a write and wire a false to it when the pulse is over in a case structure.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-02-2014 09:09 AM
Yes that is what i was thinking, but I am running into issues as to how to determine the single case is 'done'
I am trying to use 'Is task done?' but it is prematurely ending my logging, I probably have my single pulse functional global variable incorrectly created..
10-02-2014 09:16 AM
I believe the 'Task Done' returns True right after one iteration of the while loop in the 'Start Pulse' state?
10-02-2014 09:31 AM - edited 10-02-2014 09:34 AM
When I set 'samples per channel' to 2, 'task done' returns true after the 2nd delay period.
hmmm
10-02-2014 09:33 AM
It will only work for you if you have a task...and you want to know when it is done. So if you can make your task be as long as you want then you can use it.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-02-2014 09:36 AM
But aren't I creating a task in my 'Start Pulse' case?
10-02-2014 09:39 AM
@belopsky wrote:
But aren't I creating a task in my 'Start Pulse' case?
Yes and how long is that task going to run for? With analogs it is much easier to tell. If I have a finite read, then the task is over once that finite time is over. If I have a continuous task it is never over, and if I have a single point task I believe it will be over once the first read has been done. Your task is over once one cycle of your counter has been completed.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-02-2014 09:43 AM
I was under the impression one cycle of my counter was a HIGH and LOW state?
Shouldn't my task be over after the LOW state?
10-02-2014 09:50 AM
OK I think the issue is how my VI for the pulse is setup.
Upon starting, it is in the 'Start Pulse' but when it is done with 'start task' goes into 'Pulse Status' and returns true though it is not done?