Applies To: |
|
Summary: |
How can I use the MsgOpen() function in Citect. |
Solution: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The MsgOpen() function can work with two
types of names, either server names or client node names.
Please be aware that MsgOpen() does not open a new session, but rather retrieves the handle for an already existing Citect networking session. MsgOpen() will work both in Netbios and a TCPIP sockets based Citect networking architecture. See below a Page Table Tran table, as seen in the Citect Kernel. The first column ("Name") contains the server names. The second column ("Node") contains the client Node name as set via the [Lan]Node parameter. These are the clients that are connected to this Citect server. Page Table Tran
To open a session from a client to a server you need to user the server name, so the name that is listed in the "Name" column in Page Table Tran on the client. That name can be either "Alarm", "Trend", "Report" or a name of an I/O server. So then the syntax is: MsgOpen("<server name>",0,0) // this opens a session from client to server To open a session from server to client you can use the client node name, so the name that is listed in the "Node" column in Page Table Tran on the server. So then the syntax is: MsgOpen("<node name>",2,0) // this opens a session from server to client. MsgOpen should return a valid number when it is executed successfully. This number can differ from the "hMsg" as seen in Page Table Tran. If a –1 is returned then an error has occurred. |
Keywords: |
Related Links
Attachments