Question: Write a python code for generating 2 waveforms signal A and signal B. The waveform consists of a repeated set of cycles. signal B should

Write a python code for generating 2 waveforms signal A and signal B.

Write a python code for generating 2 waveforms signal A and signal

The waveform consists of a repeated set of cycles. signal B should be 50 microseconds.

Figure 1 There are 2 switch inputs to generate signals, Switch1 and switch 2.

there are four parameters a,b,c and d.

If Switch1=0, it enables the stream of pulses, else if switch1=it disables the stream of pulses

similarly, If switch2=0, run in normal mode, else if switch 2=1, run with a new waveform cycle.

The new waveform cycle parameters are given below parameter a =width of 1st pulse, 2nd pulse = a + 50microseconds, 3rd pulse = a + 100microseconds, 4th pulse = a + 150microseconds, etc

parameter b =width of space between pulses (ALL spaces are the same).

parameter c= Number of pulses in a block.

parameter d =space between pulse blocks.

New waveform parameters are as follows.

The possible system modes are as follows If Mode =1, Switchinput 2 = 0 => normal waveform .

Switchinput 2 = 1 => Remove 3 pulses from the pulse block (i.e. c-3 pulses in block) until switch 2 is set back to 0.

If mode=2 , Switch input 2 = 0 =>normal waveform.

Switch input2='2' => Generate inverted form of complete Sig A waveform (from the largest pulse to the shortest) until switch 2 is set back to 0

if Mode=3, Switch input2=0 =>Normal waveform.

switch input2=1=>insert an extra 3 pulses into the pulse block (i.e. c+3 pulses in block) until the switch is set back to 0

if Mode=4 , Switch input2=0=>Normal waveform.

switchinput2=1=> Half d and b time until switch set back to 0.

Figure 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!