11-17-2010 10:13 AM
Hello,
I get an error on daqmx 6211
Possible reason(s):
Value passed to the Task/Channels In control is an empty string (or I/O control).
The value must refer to a valid task or valid channels.
App is simple and I dont see a reason for error
11-17-2010 11:08 AM
Hi,
You are getting this error because you selected "Finite Sample". This way, the task will be created, executed, and stopped (thus deleted). That's why you get this error.
You have to select "Continuous Sample" if you want to generate continuously. But you will have to change the way you handle your task in the while loop (never put a Start Task and Stop Task in a loop).
Regards,
11-18-2010 02:05 AM
Dear sasko,
In my opinion, it is correct to use "Finite Samples". But you cannot use "Clear Task" inside the loop - it deletes the task and its reference thus creating your error. Replace "Clear Task" with "Stop Task", and put "Clear Task" outside the loop, just before error handler.
Please let me know if it worked.
Regards,
11-19-2010 02:47 AM
Dear Mateusz,
You are right, It works after I replace "clear task" with "stop task".
Now is OK with this.
I' try to make something like burst generator, I 'm sending 50 pulse with 500Hz frequency and this is made for 100ms.
The problem is long time between two union of pulses, of about 200ms and I can not make it shorter.
Any idea ?
Regards
11-19-2010 02:49 AM
11-19-2010 04:50 AM
Dear sasko,
How do you control the time between separate pulse trains? Have you tried what Helmut O'Brian mentioned above?
What hardware are you using?
Regards,
11-19-2010 05:28 AM
I don't control time between pulses, only as fast as possible.
I'm use NI USB 6211 DAQ.
I will try to use timing loop,
Sasa
11-19-2010 10:05 AM
Dear sasko,
Please let us know how it went. I would also like to know what you mean by "long time between two union of pulses". Could you maybe post some screenshots?
You can also try different architecture, please have a look here:
http://decibel.ni.com/content/docs/DOC-12164
The only problem is this is continuous generation, but stopping it after certein number of iterations shouldn't be difficult.
Regards,
11-24-2010 05:05 AM
Hello,
I will try to give more detail about my application.
I make a software for scanning of material with sensor and I have to control a step motor to move 1mm, measure with AD and same again.
To move step motor I have to send a finite number of pulses to driver and then I need to measure the value from sensor and place on graph.
The problem is long time between pulses of 200ms ( see attch) which slow down my measurement.
I can not use continous pulse generation since I need to know when I can measure. I don't have any delay in software.
Regards
11-24-2010 10:41 AM
Dear sasko,
Did you try removing the "for loop", just to check if a single pulse train can be generated properly?
And, if I understand correctly, you could use the continuous generation - you should just use the iteration counter to determine how many pulses have been generated.
Regards,