03-26-2010 02:30 PM
I have been trying to collect just single points of data into a write file in my programs. I typically use a switch, a relay, a seperate module, a counter, and then write it. But it seems that sometimes it write more than one value, and sometimes it writes less. For example, if I hit the button 4 times, I may end up with 5 values, or 3. Is there anyway to refine this system?
Thanks! Mark.
03-26-2010 04:14 PM
Hi Mark,
Try a switch, a combi trigger, and the relay.
Set the Combi Trigger for Rising Edge, and the post trigger value for 1.
That will shorten the duration of the switch pulse to 1 sample.
04-01-2010 11:09 AM
Thanks CJ.
I'll actually have 2 LVDTs on this system and need to collect 2 different valued points at any specific load. Will the "Start/Stop of 2 channels" output 2 values for my file? I see there is an option when I use the combi trigger.
Also, by rising edge, should I set it to Rising TTL Edge? And stop should be set to "Never"?
04-01-2010 11:53 AM
First, the combi trigger...
Use Combi Trigger with one input. Then set the start condition for rising TTL edge (that comes from the switch), and the stop condition is direct. The trigger will output a single 5 V pulse each time you click the switch (I like the one-shot Switch mode for this).
The Switch is outputing a 0 or a 5, and the rising edge condition is the transition from 0 to 5.
Set up the Relay with two data inputs and one control input. The output of the trigger goes to the X of the Relay.
The outputs of your LVDTs go to the data inputs of the Relay.
04-02-2010 10:39 AM
I am still having a hard time getting this to work. I know you spelled everything out, but it doesn't seem to be working. Any suggestions? I have it in the order "Switch, Relay, Combi trigger, Write". Is that correct?
-mark
04-02-2010 10:51 AM
Switch, configured for one-shot
Combi-Trigger, configured for one channel for start/stop
-Start on Rising Edge
-Stop Direct
-Post Trigger 1 sample (value)
Relay, one X input and two data inputs (0,1).
Connect Combi Trigger output to the X input of the Relay
Connect your LVDT channels to the 0,1 inputs of the Relay
Write Data module
Configured with two channels.
I'm waiting for you to tell me that you have the mismatched data error!
04-02-2010 11:00 AM
04-02-2010 11:05 AM
The idea is that the Combi Trigger shortens the pulse of the Switch. The duration of the One-Shot Switch ON (TTL High or 5V) is determined by the block size.
So, Switch to Combi Trigger allows the trigger to see the Rising Edge of the One-Shot Switch, and truncate it to one sample wide.
What version of DASYLab are you using? Do you want to post your worksheet here (you must zip it first). Or, you can contact your DASYLab reseller. If you are in the US, you can contact us at Measurement Computing (www.mccdaq.com).
04-02-2010 11:26 AM
Thanks for the explanation. Yeah it says "Mismatched input channels: the time information or block length of the input channels do not match. These channels cannot be linked in this module". I'd post it for you, and I took a screen shot but I am unsure how to post it to this page. Do you link it from a hosting site?
04-02-2010 11:32 AM
I got it now. I was connecting scaled data to the inputs of the relay. So instead, I took and connect it to the raw voltage that was coming out. Thats why it didnt' understand. Is there anyway to hook it up to take my actual scaled data or do I have to scale it after it comes out of the relay?
Thanks so much