Noa Posted June 14, 2023 Share Posted June 14, 2023 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 More sharing options...
0 attila Posted June 14, 2023 Share Posted June 14, 2023 Hi @Noa Probably you are trying to set more bits than the device supports, 32768 Link to comment Share on other sites More sharing options...
0 niko11 Posted July 25, 2023 Share Posted July 25, 2023 (edited) 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 July 25, 2023 by niko11 Link to comment Share on other sites More sharing options...
0 niko11 Posted July 27, 2023 Share Posted July 27, 2023 (edited) the trick was done by : device.open(config=3); Edited July 27, 2023 by niko11 Link to comment Share on other sites More sharing options...
0 attila Posted July 27, 2023 Share Posted July 27, 2023 Hi @niko11 Are you sure you are using Digital Discovery ? This has one configuration. Link to comment Share on other sites More sharing options...
Question
Noa
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
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 accountSign in
Already have an account? Sign in here.
Sign In Now