02-01-2008 10:14 AM
02-06-2008 08:24 AM
If I have a regular on -off switch. (digital 1 for on, 0- for off- not momentary switch). so can someone tell me how to modify the soft start and stop to instead be activated froom a hard start-stop button. I'm totally confused now. I can't think of anything. I knwo I have to use the DAQmx reads but I cannot figure how.
The logic I know will be, if the daq reads 1 start the process and if if it reads 0 intially do not satrt. But during the process if it reads a 0, then you stop the process. So what this is upposed to do is continuosly monitor the daq line.
I totally don't know how I can modify the code to do that. Do I need another state machine or if I should make the modifications in the existing state machine.
I know i have reposted this msg a gazillion times on the forum, but I really need some help.
02-06-2008 08:40 AM
02-12-2008 07:34 AM
I give up I just cannot seem to program this. I'm sure I'm doing something insanely wrong. Could someone please help me edit my VI to link the hard start stop button in place of the soft start and stop. I am falling way behind schedule on this project. Please help
02-12-2008 08:19 AM
I cannot see any boolean after putting DAQmx read of a digital boolean 1 channel 1 sample. So what do I replace the front panel start stop switches with ?
Ravens Fan wrote:
Start by dropping in a DAQmx read of a digital boolean 1 channel 1 sample. It iwll put out a Boolean that is True if the switch is closed and a False if it is open. Replace your front panel start stop switches with these.
02-12-2008 08:51 AM - edited 02-12-2008 08:51 AM
smm wrote:
I cannot see any boolean after putting DAQmx read of a digital boolean 1 channel 1 sample. So what do I replace the front panel start stop switches with ?
02-12-2008 08:59 AM
I have done what you have said (or I think it is what you said). Could you take a look and tell me if this is what you were saying.
In the 1st frame I have the daqmx read with the boolean and then in the while loop I replaced the stop witha local variable of the boolean.
Will this make the 2nd frame active(start) when switch is closed and 0 when it is open and hence stop the process?
02-12-2008 09:57 AM
02-12-2008 10:45 AM
I'm pretty sure this might still not be correct. But please take a look
Ravens Fan wrote:
Pay attention to your task wires. You have one create task with multiple channels. But you have that same task feeding to the new DAQ read you just created. Also, I don't know what is going on in those subVI's, but you have that task wire going in and other channel/task wires going into the same subVI.
Initally when I used to use different tasks for different read VIs it used to give some error saying too many tasks are created in one VI. So I use one create task and feed it to the reads.Could you show me how to edit what you are saying please please please
02-12-2008 12:28 PM
What is the data that goes into the Step indicator? I see it is a string. Is it specific data you want to track for each of the 6 tests? You may want to make 6 different indicators, one connected to each subVI.
I would highly recommend (and I think this was suggested before) to make each of those indicators for each test into a type def'd cluster. (I attached one as a .ctl file in LV8.5). You can bundle the values into the cluster inside the subVI. Then just pass a single wire out of the subVI into the indicator of the cluster. This will simplify wiring on your main diagram and also visually group things on your front panel. (If you want that step string, you can add that to the cluster as well.)
What is the action of your hard pushbuttons? Do you have a momentary start button and a momentary stop button? Is it a single button that latches that when it is pressed means start, and when it is unpressed means stop? A toggle switch? If they are separate buttons (which is how the software on screen buttons were), then you will need two different digital inputs, one for each button.
I know what you mean about the mutiple tasks and sometimes having errors if trying to have separate tasks. I don't know what situations raise such and error and which don't in terms of digital vs. analog, 1 sample vs. N samples, timing .... If what you are doing works without errors, keep doing it. I don't have a DAQ card present to experiment with task and channel setups. I raised the question because because I thought you had multiple tasks, but there seemed to be a single task wire going to different channels to be read.