sand
-
Posts
2 -
Joined
-
Last visited
Reputation Activity
-
sand reacted to attila in No constant type in Waveforms API
Hi @sand
The easier is to use Digital/StaticIO functions.
For constant with DigitalOut use Counter 0|0 and specify (initial) value with CounterInit
dwf.FDwfDigitalOutEnableSet(hdwf, channel, 1)
# dwf.FDwfDigitalOutIdleSet(hdwf, channel, DwfDigitalOutIdleInit) # default value
dwf.FDwfDigitalOutCounterInitSet(hdwf, channel, 1, 0) # 1 = initialize with high when running
dwf.FDwfDigitalOutCounterSet(hdwf, channel, 0, 0) # low/high count zero, no toggle during run, constant
-
sand reacted to JColvin in No constant type in Waveforms API
Hi @sand,
You'll be wanting FDwfDigitalIOOutputEnableSet and FDwfDigitalIOOutputSet which are defined in the Digital IO section (section 8) of the WaveForms SDK Reference Manual.
DigitalIO.py in the samples folder uses these two functions, enabling DIO 0 to 7 as outputs and then setting IO pins 2 and 5 as logic high.
Let me know if you have any questions (or if I misunderstood what you are wanting to do).
Thanks,
JColvin