Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the GateSignal property in CWPulse?

I'm using ComponentWorks 2.0.1 with VB6. In trying to understand how to use the CWPulse control, I ran across the GateSignal property. The documentation, which is kind of light on examples already, includes a short sample code snippet which is supposed to illustrate the use of GateSignal: (following is from on-line help)

Syntax

CWPulse.GateSignal

Data Type

Integer

Purpose

Specifies the gate signal and is used in conjunction with GateMode and GateSource.

Example

'configure a pulse to start a single pulse on the rising edge of the counters

'gate signal on the external connector

CWPulse1.PulseType = cwpulseSingle

CWPulse1.GateMode = cwpulseRisingEdgeGate

CWPulse1.GateSource
= cwpulseCtrGateGS

'Note: the source, cwpulseCtrGateGS, does not use the GateSignal property

(end of sample)
Has anyone out there an idea of what this is for, esp. its relationship to GateSource?
0 Kudos
Message 1 of 3
(3,426 Views)
The purpose of these properties is best seen in the property pages. These three properties (Gate Source, Gate Mode, Gate Signal) define what signal is used to gate the counter. The gate controls the flow of the pulse train. These three properties define the signal for the gate and how it should be interpreted. The GateSource defines where the signal is coming from (i.e. Counter's Gate pin, PFI line (on connector block), or maybe RTSI line from another board). For some settings of the GateSource (like PFI and RTSI), I also need to specify which specific line. Therefore, if I wanted my gate to be PFI6, I would set GateSource to cwpulsePFIGS (specifying a PFI line) and GateSignal to 6.

The GateMode specifies how to interpret the gate signal. So, now tha
t I specified the signal is on line PFI6, do I want the gate to close when a high TTL signal is coming in? a low TTL signal? on a rising or falling edge?

So if I was connecting a gate signal to PFI6 (on a connector block for my board) and I wanted it to open the gate when this signal was on a rising edge, I would set:

CWPulse1.GateMode = cwpulseRisingEdgeGate
CWPulse1.GateSource = cwpulsePFIGS
CWPulse1.GateSignal = 6

Note: GateSignal does not apply for all GateSources. See the CWPulse property page for which Sources it applies to.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
Message 2 of 3
(3,426 Views)
Thanx, Chris! If your sample code was in the ComponentWorks Help in place of what was put there, I wouldn't have had to ask this question!
0 Kudos
Message 3 of 3
(3,426 Views)