begin;

text { caption = "Program started"; font_size = 24; } text1;

picture 
{
   background_color = 0,0,255;
   text text1;
   x = 0; y = 100;
} hello_pic;

trial 
{
   trial_duration = 2000;
   picture hello_pic;
   time = 0;
   duration = 1000;
} show_trial;

begin_pcl;


# Example to control 5 cells over TCP-IP
# Use the MVBD.exe on standard port 2018
#
socket socket1 = new socket;
socket1.open("127.0.0.1",2018, 10000);	# TCP-IP on localhost port 2018
socket1.set_encoding(socket1.BINARY);

string str = "12345678";            
str.set_char( 1, 3       );	# command 3
str.set_char( 2, 5       );	# length of following bytes (low byte)
str.set_char( 3, 0       );	# length of following bytes (high byte)

str.set_char( 4, 1+8     );	# cell 1, two upper dots are set
str.set_char( 5, 2+16    );	# cell 2, two dots in the second line
str.set_char( 6, 4+32    );	# cell 3, two dots in the 3rd line
str.set_char( 7, 64+128  );	# cell 4, two dots in the 4th line
str.set_char( 8, 255     );	# cell 5, all dots

socket1.send(str);

# values of the dots
#
#   1  oo  8
#   2  oo  16
#   4  oo  32
#  64  oo  128
#


