[Visual-devel] Fwd: Re: Dear Mr. Thomas Hergenhahn,
Status: Alpha
Brought to you by:
lettoz
From: Thomas H. <Tho...@we...> - 2004-05-11 22:04:49
|
"Thomas Hergenhahn" <Tho...@we...> schrieb am 12.05.04 00:01:0= 4: "Can Cui" <cac...@fh...> schrieb am 11.05.04 22:53:11:=20 > =20 > Dear Mr. Thomas Hergenhahn,=20 > =20 > In your former email, you said these about how to send commands from=20 > client to the server:=20 > =20 > >> how do we send operation commands from the client to the=20 > >>server. The connection between client and server has already been set = up.=20 > >=20 > > The client (HMI page) sends commands to the server, which will update=20 > > values in the=20 > > spreadsheet. You can watch the changes in the spreadsheet editor direc= tly.=20 > >=20 > =20 > Would you please explin this in detail=3F For example, if we want to send=20 > commands to the server, which function, class are we going to use=3F=20 > =20 Again, I=B4m not quite sure what you want to do.=20 Using VISUAL as mainly intended (hmi and server together), any page will h= ave the line:=20 <param name=3D"communicator" value=3D"hmiVisualCI">=20 or, in the newer version:=20 <param name=3D"communicator" value=3D"org.visual.hmi.protocol.hmiVisualCI">=20 All your widgets put their variable names int a hashtable held by hmiViewe= r Applet.=20 hmiViewer passes them to the communication interface.=20 hmiVisualCI will issue a request like the following to VISUAL=B4s server:=20 "getlist A1,A2,B9,H111,G7,2:F3<lf>"=20 The server would respond with something like:=20 A1=3D1.0<lf>=20 A2=3D8.222<lf>=20 B9=3D1.122<lf>=20 H111=3D12.1<lf>=20 G7 =3D=3F=3F=3F<lf> // assumed this cell doesn=B4t exist=20 2:F3=3D8.444<lf>=20 end of list<lf>=20 =20 If you include a widget that can change values, e.g. a potentiometer, then= , if the user=20 changes its position clicking it, the potentiometer will call hmiViewers p= utVal()=20 method, e.g. putVal(Q13,17.0). hmiViewer passes this to hmiVisualCI=B4s putV= al method,=20 which will issue a call to the server:=20 set Q13=3D17.0<lf>=20 The server should responds with:=20 ok<lf>=20 =20 There are some more commands in the protocol:=20 From hmi pages, these are also used:=20 sheet=3D[number] sets the standard spreadsheet after connecting.=20 tset [col][row]=3D1<lf> sets a variable to 1, which will then be reset to 0 = after=20 delivering it to the PLC. This is for pushbuttons, see better explanations= in=20 hmiVisualCI.java or the server source or in plcdrv.cc=20 savesettings<lf> instructs the server to save all values changed by hmi pa= ges into=20 files to save settings permanently. (so they are still present after serve= r restart)=20 =20 There are other commands the server can understand, which are used to disp= lay/edit a=20 spreadsheet remotely. I also may have forgotten something here :-)=20 =20 If you view the spreadsheet, you could watch how the value of Q17 changes = in above=20 example.=20 You could also change values manually and see how they are propagated to t= he hmi page=20 in the next refresh cycle.=20 =20 You can test the server with some Perl scripts coming with VISUAL, servert= est.pl and=20 any other file named like s*test.pl. You can modify these scripts to test = just what you=20 like or what variables exist in your spreadsheets.=20 =20 Thomas=20 =20 =20 =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F ... and the winner is... WEB.DE FreeMail! - Deutschlands beste E-Mail ist zum 39. Mal Testsieger (PC Praxis 03/04) http://f.web.de/=3Fmc=3D021191 |