06-15-2008 03:41 PM
06-15-2008 03:43 PM
06-16-2008 03:18 PM
06-16-2008 04:54 PM
Hello BR,
I'm not exactly sure what you're trying to do, but let’s see what we can figure out. It sounds like you're trying to control the current throughput to your load using a thyristor and control the thyristor with the USB-6251.
It sounds like you want to turn the thyristor on for the specified pattern:
"12x (10 ms ON – 30 ms OFF) - number of cycles (loops) could vary
24x (10 ms ON – 50 ms OFF) - number of cycles (loops) could vary
39x (10 ms ON – 70 ms OFF) - number of cycles (loops) could vary"
What signal are you using to control the thyristor? Are you using a digital line or something else?
Also, I'm unsure what you're "predicting-calculating" are you saying that you're trying to predict when you need to trigger the thyristor in order to turn it on for the 10 ms intervals mentioned above or are you referring to something else? If you're trying to do that then I would recommend using a correlated digital output to output the desired waveform with hardware timing. As you've mentioned, a Windows operating system does not use deterministic timing. While allowing 2.5 ms for this trigger to occur is a good idea, Windows may take longer or shorter depending on what else is doing. That is likely the time variation that you're seeing.
If you can define your desired input and output signals a little more it would be easier to decide on the best solution.
Cheers,
06-16-2008 05:02 PM
06-17-2008 03:36 AM
Hello
Yes thyristor will be controlled (triggered) trough USB-NI 6251 + some additional opto-coupler (just in case..).
Yes thyristor will be triggered in such way that I will achieve the following pattern - as you presume correctly. So thyristor must be ignite at the start of each pulse – to be shore the pulse could be 5 ms long ( lets say 2,5 ms before line voltage cross zero).
For control the thyristor I can use any signal I want - yes digital output is probably the best way (since I see that ADC take ~45-50 ms for complete the 20 ms long pulse I presume that analog output will be to slow).
Yes with term "predicting-calculating" I mean that I plan to measure (find) zero cross and according to this data I can calculate when I must trigger the thyristor.
I can find one zero cross (lets say falling) then add 10 ms to calculate the next one which will be rising and subtract 2.5 ms for reserve. That mean that 7.5 ms after zero cross (falling) I must send 5 ms long pulse (just to be sure that thyristor will start – ned some reserve), The second pulse to thyristor will be 47.5 ms after the referenced zero cross (measured at first place).
Using the custom design waveform controlled with HW clock is god idea. Then the only thing that I need to do is to find the zero cross point and according to this stat the waveform.
Problem is that I'm a beginner and I don't know how to do this. Could you tell me how to do that - VI would be the best. You don’t have to bother with the whole waveform first two cycle would be enough – just to se how it goes. How to find zero cross and not lose ~40 ms (like in my example).
Thanks in advance
06-17-2008 05:41 PM
Hello 1over0,
It sounds like you should probably use the analog input sample clock to also be the digital output sample clock. Then, by buffering a given waveform 10ms high 30ms low, etc, you can output this on the digital line to control the thyristor. Also, in order to make sure you start on the first zero crossing you could set up an analog window trigger for entering the window and set it for 0 to 10 V so that your task will start on the first zero crossing (rising). Then you should be able to start on a zero crossing and output a specified waveform to control the thyristor--it sounds like this should work as long as the incoming frequency is exactly 50 Hz.
Also, its sounds like AnalogKid2DigitalMan may have suggested a hardware addition that would make this setup significantly easier. Have you considered getting one of these relays and then just reading data continuously? This would eliminate the requirement that your incoming frequency be a constant 50 Hz.
I hope this helps.
06-18-2008 12:49 AM
As said this is NOT an application that can be implemented with windows and Labview.
You will have serious problems.
If you insist on playing (not recommended), use a isolation transformer at the AC input .
06-18-2008 03:18 AM
06-18-2008 11:56 AM
Hello 1over0,
I think there are a couple example VIs that you will find helpful. In order to access the example finder open LabVIEW and go to Help» Find Examples...
The first example I would recommend shows you how to use an analog sample clock to clock your digital lines. In this example it’s a digital input task, but you configure the sample clock the same for a digital output task. Navigate to Hardware Input and Output» DAQmx» Synchronization» Multi-Function» Multi-Function.llb\Multi-Function-Synch AI-Read Dig Chan.vi By modifying this example for output you'll be able to synchronize your digital write with your analog input.
The second example is this: Hardware Input and Output» DAQmx» Analog Measurements» Voltage» Cont Acq&Graph Voltage-Int Clk-Analog Start.vi This VI shows you how to configure an analog edge start trigger. I would recommend changing the DAQmx timing VI in this example to be an Analog Window Start Trigger and configuring your window to start the task on the first rising zero crossing.
Basically you'll want to start with the first example, modify it for digital output, and then implement the analog window trigger.
Cheers,