function [err,errmsg] = OsiPing(ConNo)
%
% OsiPing.m					To test connection between OLGA Server and MATLAB.    
%
% The calling syntax is:
%
%   [err, errmsg] = OsiPing;
% 
% Copyright (c) 1998 by ABB Corporate Research.
% All Rights Reserved.
%
% $Revision: 1.0, 5/10-1998 by Kjetil Havre, ABB-NOCRC$
% $Revision: 1.1, 20/7-2005 by Espen Storkaas, ABB-EOP, included user-defined connection number$ 
  if nargin==0
      ConNo=1;
  end
  if nargin > 1 
     errmsg = 'OsiPing usage: [err, errmsg] = OsiPing(ConNo)';
     disp(errmsg);
     err = -1;
     return
  end

  [err, msg, ibody, rbody, errmsg] = osmi(ConNo, 'OLGA_PING', [], [], []);

  