I sell on Tindie

Monday, September 27, 2021

Traffic Light in NI Multisim using Programmable Logic Devices (PLD)

Traffic Light in Multisim using PLC

Written by Larsha Johnson

Programmable Logic Devices (PLDs) are integrated circuits that contain a relatively small number of functional elements that provide user-configurable logic functions (AND, OR, etc.)
In Multisim a PLD schematic contains specialized components that define the operation of the individual logic blocks of the PLD.

What is PLC and PLD?

The biggest difference between the two is the control logic. PLC is a fixed logic device (the function is realized by changing the software), and PLD is a variable logic device (the function is realized by changing the internal circuit structure). 

The concepts of PLC and PLD can be practiced through this two-way traffic light example. The main implementation of traffic light signals in to avoid traffic jams and serves the purpose of avoiding vehicular collisions.

The ladder diagram in this blog runs two traffic lights. The ladder diagram is contained in a separate hierarchical block called TrafficLightLogic

There are two different traffic light examples available, look in the sample circuit "blue folder icon" in the Educational version of Multisim that implements a traffic light:

  1. National Instruments\Circuit Design Suite 14.2\samples\Educational Sample Circuits\Ladder Diagrams
  2. National Instruments\Circuit Design Suite 14.2\samples\PLD Sample Circuits

The first choice uses programmable ladder logic with an actual traffic light simulation. For choice two, you can export the sample to program the NI Digital Electronics FPGA Board.


Drag n drop these snippets directly into your Multisim workspace :slightly_smiling_face:

*I also attached a short version of the NI Multisim for Education PDF specifically for traffic light designs.

What is an SNIPPET file? Section of programming code saved in XML format; code snippets can be saved from Visual Basic, Visual C#, and Visual J projects; they can be edited using the Code Snippet Editor and managed using the Code Snippets Manager. 

Find the attached files below. Hope this helps!

This topic refers to education-specific features of Multisim.

Saturday, September 25, 2021

MATLAB - Family of Curves (Vectorization)

MATLAB Techniques

Written by Larsha Johnson

Linear Signals and System, matrix operation fundamentals. This example illustrates a techniques called vectorization. Algorithm vectorization uses matrix and vector operations to avoid manual repetition and loop structures. With simultaneous creation of curves one can maximize the use of matrix applications. 
The result here is a 201 x 11 matrix with identical columns. 

%% Matrix Operations - Family of Curves 
r = [1 0 0] 
A = [2 3;4 5;0 6] 
c = r' B = [c A] 
A = [1 -2 3;-sqrt(3) 1 -sqrt(5);3 -sqrt(7) 1]; 
y = [1;pi;exp(1)]; 
x = inv(A)*y x1 = det([y,A(:,2:3)])/det(A) alpha = (0:10); 
t = (0:0.001:0.2)'; 
T = t*ones(1,11); 
H = exp(-T*diag(alpha)).*sin(2*pi*10*T+pi/6); 
plot(t,H); xlabel('t'); ylabel('h(t)'); 
[R,P,K] = residue(B,A) 
[R,P,K] = residue([1 0 0 0 0 pi],[1 -sqrt(8) 0 sqrt(32) -4]); 
R.', P.', K title('Family of Curves - Vectorization')

Try this code out to graph this figure! Modify freely and comment on this post if it helps. Thanks for reading.

Raspberry Pi Pico W - 2 Quick Projects to Get You Started

July 1st 2022 💖We love new arrivals! Here are two quick projects to get you started with the Raspberry Pi Pico W. Tips :  Get the latest fi...

Popular Post