Jump to content
  • 0

Digital Discovery Trigger immediately in SDK with C


rbt

Question

I've searched the forum and looked at SDK examples in C but could not find a method to trigger a single capture of the high speed 32-bit digital inputs of the Digital Discovery 2.

I don't need to trigger on a transition, but rather, would like to have a function to immediately perform trigger each time the function is called.  I only need one 32-bit sample as a return from the function and would rather not have to sort through a recorded capture buffer.

I've attempted this using the record function calls but have had execution exceptions probably due to indexing too far into a buffer.

@attila Do you have an example C program doing this making use of the SDK API?

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @rbt

You can use the following:

fs = c_uint64()
dwf.FDwfDigitalIOStatus(hdwf) 
dwf.FDwfDigitalIOInputStatus(hdwf, byref(fs)) 
print("Digital IO Pins: ", bin(fs.value&0xFFFF)[2:].zfill(16))
print("Digital IN Pins: ", bin(fs.value>>16)[2:].zfill(24))


Digital IO Pins:  0000000000010010
Digital IN Pins:  000000000000000000000001

image.png.04e82a1a97fe4337b7ce76c26f62875f.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...