EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: weird behaviour of SNL test program running on Soft IOC on LINUX
From: "Oleg Makarov" <[email protected]>
To: "EPICS tech-talk" <[email protected]>
Cc: [email protected], "Stepanov, Sergey" <[email protected]>
Date: Mon, 16 Mar 2009 11:03:58 -0500
A small SNL test program strangely misbehaves when it being run on Soft IOC on LINUX.
Under VxWorks this SNL test program program behaves as expected.


program test("name=my_test, dev=23b:GO:mom:")

  %%#include <string.h>

  string str_rsp; assign str_rsp to "{dev}StrRsp";

  string str_cmd; assign str_cmd to "{dev}StrCmd";

 

  ss main {

    state tst {

      when(pvConnectCount() == pvChannelCount()) {

        strcpy (str_cmd, "I522");

        pvPut(str_cmd); epicsThreadSleep(1.0);

        pvGet (str_rsp); epicsThreadSleep(1.0);

        printf ("str_rsp = %s \n", str_rsp);

        strcpy (str_cmd, "I521");

        pvPut(str_cmd); epicsThreadSleep(1.0);

    } state tst

  }

}


This program interacts with device using two EPICS PV strings:
1)  writes a command "I522" and sleeps one second
2) reads a response and sleeps one second
3) prints a response at IOC console
4) writes a command "I521" and sleeps one second
The program repeats this sequence periodically.
 
being run under the VxWorks OS program behaves exactly as expected:

23b:ioc2> seq &test, "name=my_test, mtr=23b:GO:mom:"

SEQ Version 2.0.12: Mon Feb 9 13:16:21 2009

Spawning state program "test", thread 0x1ee970f0: "my_test"

value = 518615280 = 0x1ee970f0

23b:ioc2> str_rsp = 378.88

str_rsp = 378.88

str_rsp = 378.88

str_rsp = 378.88

str_rsp = 378.88

str_rsp = 378.88

str_rsp = 378.88


camonitor connected to these two PV strings shows timing as expected:


gmca@mar3:~ 6> camonitor 23b:GO:mom:StrCmd 23b:GO:mom:StrRsp

23b:GO:mom:StrCmd 2009-03-13 18:12:19.025831 I522

23b:GO:mom:StrRsp 2009-03-13 18:12:19.042497 378.88

23b:GO:mom:StrCmd 2009-03-13 18:12:21.025831 I521

23b:GO:mom:StrRsp 2009-03-13 18:12:21.025831 100

23b:GO:mom:StrCmd 2009-03-13 18:12:22.025831 I522

23b:GO:mom:StrRsp 2009-03-13 18:12:22.025831 378.88

23b:GO:mom:StrCmd 2009-03-13 18:12:24.025831 I521

23b:GO:mom:StrRsp 2009-03-13 18:12:24.025831 100

23b:GO:mom:StrCmd 2009-03-13 18:12:25.025830 I522

23b:GO:mom:StrRsp 2009-03-13 18:12:25.025830 378.88

23b:GO:mom:StrCmd 2009-03-13 18:12:27.025830 I521

23b:GO:mom:StrRsp 2009-03-13 18:12:27.025830 100


being run under Soft IOC on LINUX strange things happen - on the concole it prints a string corresponding to the responce on the second command and sometimes it prints a string with the first command "I522":

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = 100

str_rsp = I522

str_rsp = 100

str_rsp = 100


camonitor connected to these two PV strings also shows a strange timing - two commands get posted without time delays:


23b:GO:mom:StrCmd 2009-03-13 18:27:02.628072 I522

23b:GO:mom:StrCmd 2009-03-13 18:27:04.978072 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:06.628072 I522

23b:GO:mom:StrRsp 2009-03-13 18:27:06.628072 378.88

23b:GO:mom:StrCmd 2009-03-13 18:27:08.628072 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:08.628072 I522

23b:GO:mom:StrRsp 2009-03-13 18:27:08.628072 100

23b:GO:mom:StrCmd 2009-03-13 18:27:11.644738 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:11.644738 I522

23b:GO:mom:StrCmd 2009-03-13 18:27:14.644738 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:14.644738 I522

23b:GO:mom:StrCmd 2009-03-13 18:27:17.644738 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:17.644738 I522

23b:GO:mom:StrCmd 2009-03-13 18:27:20.644738 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:20.644738 I522

23b:GO:mom:StrCmd 2009-03-13 18:27:23.661404 I521

23b:GO:mom:StrCmd 2009-03-13 18:27:23.661404 I522


Any ideas on how to correct this problem with SNL test program running on Soft IOC under LINUX OS?
 
Regards,
 
Oleg A. Makarov,
Beamline Instrumentation Scientist
 

Argonne National Laboratory
9700 South Cass Avenue
Argonne, IL 60439-4861
 
Phone 630 252 0668
Fax 630 252 0667

Replies:
RE: weird behaviour of SNL test program running on Soft IOC on LINUX Mark Rivers
Re: weird behaviour of SNL test program running on Soft IOC on LINUX J. Lewis Muir

Navigate by Date:
Prev: RE: how to change the MEAN without reboot IOC? Mark Rivers
Next: RE: weird behaviour of SNL test program running on Soft IOC on LINUX Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: how to change the MEAN without reboot IOC? Mark Rivers
Next: RE: weird behaviour of SNL test program running on Soft IOC on LINUX Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024