EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: using stream -calcout
From: "Mooney, Tim M." <[email protected]>
To: l123173 <[email protected]>, tech-talk <[email protected]>
Date: Fri, 16 Feb 2018 11:29:20 +0000

The first thing is to change record(scalcout,"TEM")  to record(calcout,"TEM") and see how that works.  The scalcout record is not in base, but in the synApps calc module.


Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: [email protected] <[email protected]> on behalf of l123173 <[email protected]>
Sent: Friday, February 16, 2018 4:27:55 AM
To: tech-talk
Subject: using stream -calcout
 
Hi all,
     I have a simple question about stream. 
     The device was connected with LAN. If sending " fe 04 00 00 00 01 25 c5 " in Hex,  getting  " fe 04 02 04 08 ae 22 " in Hex. 
     Among the getting bytes( " fe 04 02 04 08 ae 22 "), 04 08 was I wanted. Convert  0408(HEX) to decimal was 1032 (4*16**2 +8=1032), and 1032 was the finall result I wanted.
     
    In my programe, I have successfully sent and got the bytes. But I could not get the 1032, I want to achieve it using scalcout, but failed.
    Could you please give me some suggestion.
    
    The environment I use, base3.14.12.7, synapps_5_8, fedora 27(64). 

my db file:
--------------------------------------------
record(stringin, "GET_HIGH")  
{
    field(DESC, "test for upstairs tcpip")
    field(DTYP, "stream")
    field(INP,  "@devtemp.proto get_high $(PORT) $(A)")
}

record(stringin, "GET_LOW")
{
    field(DTYP, "stream")
    field(INP,  "@devtemp.proto get_low $(PORT) $(A)")
    field(SCAN, "I/O Intr")
}

record(scalcout, "TEM")
{
    field(DESC, "get the temperature")
    field(DTYP, "stream")
    field(INPA, "GET_HIGH")
    field(INPB, "GET_LOW")
    field(CALC, "A*16*16 + B")
}


my proto file:
-------------------------------------------------------
get_high {
   out "\xFE\x04\x00\x00\x00\x01\x25\xC5";
   in "%*c%*c%*c%*c%*c%*c%c%c%*c%*c%*c%*c%*c%*c"; 
#   in "%s";
}

get_low {
   in "%*c%*c%*c%*c%*c%*c%*c%*c%c%c%*c%*c%*c%*c";
}
 


output of  st.cmd: (there is an error "Record "TEM" is of unknown type "scalcout" )
------------------------------------
#!../../bin/linux-x86_64/temp
## You may have to change temp to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","ioctemp")
epicsEnvSet("TOP","/home/lyx/tem_setup_with_asyn_scpi")
epicsEnvSet("EPICS_BASE","/opt/epics/base")
epicsEnvSet("ASYN","/opt/epics/synApps_5_8/support/asyn-4-26")
epicsEnvSet("STREAM","/opt/epics/synApps_5_8/support/stream-2-6a")
epicsEnvSet "STREAM_PROTOCOL_PATH"  "/home/lyx/tem_setup_with_asyn_scpi/db"
epicsEnvSet "P" "P"
epicsEnvSet "R" "T"
cd "/home/lyx/tem_setup_with_asyn_scpi"
## Register all support components
dbLoadDatabase "dbd/temp.dbd"
temp_registerRecordDeviceDriver pdbbase
drvAsynIPPortConfigure("L0","192.168.215.120:10000",0,0,0)
asynSetTraceIOMask("L0",-1,0x2)
asynSetTraceMask("L0",-1,0x9)
## Load record instances
dbLoadRecords("/home/lyx/tem_setup_with_asyn_scpi/db/devtemp.db","P=P,R=T,PORT=L0,A=0,user=lyxHost")
Record "TEM" is of unknown type "scalcout"
Error at or before ")" in file "/home/lyx/tem_setup_with_asyn_scpi/db/devtemp.db" line 25
cd "/home/lyx/tem_setup_with_asyn_scpi/iocBoot/ioctemp"
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.7
## EPICS Base built Feb  7 2018
############################################################################

Regards,
Li xing


 


References:
using stream -calcout l123173

Navigate by Date:
Prev: using stream -calcout l123173
Next: Re: using stream -calcout Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: using stream -calcout l123173
Next: Re: using stream -calcout Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 16 Feb 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·