Jump to content
  • 0

Digital discovery pattern generator


Noa

Question

Hi, 

I am using digital discovery waveforms SDK, and I'm trying to use the pattern generator function to send a custom signal.

the code I am using:

Device_data = device.open()

logic.open(Device_data, buffer_size=4096)

pattern.generate(Device_data, channel=data_channel, function=pattern.function.custom, frequency=bclk, data=pdm_samples.tolist())

 

the data I am sending is a list of integers I've created.

I keep getting this error:

WF_SDK.device.error: Error: pattern -> generate -> Invalid bit count provided.

 

what could cause this error?

 

thanks,

Noa

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello, i have a similar error. trying to make 2000+ bit (?) signal: 

PATTERN_FREQUENCY = 2*200e3; PULSE_DUTY_CYCLE = 30; LATCH_PATTERN_LENGTH = 1023; SAMPLERESET_PATTERN_LENGTH = 5;
    DIO_LATCH = 7;  
    
    VLATCH_PATTERN =  (2*SAMPLERESET_PATTERN_LENGTH+1) * [0, 1] + [0, 1]*LATCH_PATTERN_LENGTH; 
    
    device_data = device.open(); logic.open(device_data, sampling_frequency=3*PATTERN_FREQUENCY, buffer_size=4096); 
    
    pattern.generate(device_data, channel=DIO_LATCH, function=pattern.function.custom, \
                        frequency=PATTERN_FREQUENCY, duty_cycle = PULSE_DUTY_CYCLE, data = VLATCH_PATTERN); 

and i am getting the same error:  "Invalid bit count provided"

Could you help me what is my mistake?

Edited by niko11
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...