This program simulates the way a process computer works.
The main window of this programme is a picture representing the most
important parts of the process computer: main board and 8 I/O cards.
Each card can be used as:
The programme simulates the way each one of this cards works .
For instance: every time an AI-124 card gets some data a light turns on and the
data is displayed. This programme is a variant of a real application that runs on a 386/40 MHz
process computer designed by ICE Felix SA Bucharest. This computer has a QNX 4.2 operating
system and the application's interface is built to "work with" Photon 1.0. The only one
difference between the real application and this programme is the way data is received:
the first one gets data directly from the 8 cards already mentioned and the second
generates data at random.
When initialising the application a 'setup' function is called. This function enables the user to specify
a type for every attached card. The simulator does not provide a setup sequence - the configuration
is static:
Each card is served by a special process (depending on card's type) as it follows(these processes are
launched when setup is completed):
Processes running with the real application communicate with card drivers. For instance proc_di
is blocked waiting for one input to change state. Every time a change of state occurs, the proc_di
process is awakened.
In our case,these processes generate input data at random . Data is sent to the 'usp' process by
means of QNX message passing procedure. Every time 'usp' receives a message, it calls the 'handler'
function that displays data and also turns on a light to specify which card is active.
Each one of the AI , DI , FI , DO and AO cards has "on top" a button labelled 'AI_124','DO_124' ,
'AO-124' and so on . When clicking this button a new window is displayed on the screen.This window
shows some more information on data received from the related card:
The AI-124 and DI-124 windows displays 6 graphs - one graph shows data received from one of the 24 input channels.
To switch between graphs you have to click the "NEXT" button.
The DO-124 window displays 24 ON/OFF buttons - each one shows the state of one output.
Clicking the "AUTO" button stops the 'proc_do' from generating data.This way one can control the DO-124
card by means of these 24 buttons (in this case data is sent from 'usp' process to 'proc_do' process) .
The AO-124 has 6 related sliders.Clicking the "AUTO" button one can control the outputs by means of these
sliders (in this case data is sent from 'usp' process to 'proc_ao' process) .