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  <20152016  2017  2018  2019  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: problem scale word data
From: JaeRyong Seo <[email protected]>
To: [email protected]
Date: Tue, 7 Apr 2015 18:43:00 +0900
Hi, all

for communication with PLC via using modbus, I used modbusR2-5 version.

i want to know how to scale word data.

for example.
this is Trans1.substitution file
file "../../db/mbbiDirect.template" { pattern
{P, R, PORT, OFFSET, MASK, SCAN}
{CIS:TRANS1:, YWIn10, T1_Yn_In_Word, 0x10, 0xFFFF, "I/O Intr"}
{CIS:TRANS1:, YWIn11, T1_Yn_In_Word, 0x11, 0xFFFF, "I/O Intr"}
}
file "../../db/intarray_in.template" { pattern 
{P, R, PORT, NELM, SCAN}
{CIS:TRANS1:, YWIn0Array, T1_Yn_In_Word, 80, "I/O Intr"}
}
file "../../db/asynRecord.template" { pattern 
{P, R, PORT, ADDR, TMOD, IFACE}
{CIS:TRANS1:, YWIn0Asyn, T1_Yn_In_Word, 0, Read, asynInt32}
}
file "../../db/statistics.template" { pattern 
{P, R, PORT, SCAN}
{CIS:TRANS1:, YWIn0St, T1_Yn_In_Word, "10 second"}
}
file "../../db/poll_delay.template" { pattern
{P, R, PORT}
{CIS:TRANS1:, YWIn0PollDelay, T1_Yn_In_Word}
}

# These are the Yn outputs done with bit access. Y0-Y7 
file "../../db/bo_bit.template" { pattern
{P, R, PORT, OFFSET, ZNAM, ONAM}
{CIS:TRANS1:, YWOut10, T1_Yn_Out_Word, 0x10, 0xFFFF, "I/O Intr"}
{CIS:TRANS1:, YWOut11, T1_Yn_Out_Word, 0x11, 0xFFFF, "I/O Intr"}
}
file "../../db/asynRecord.template" { pattern 
{P, R, PORT, ADDR, TMOD, IFACE}
{CIS:TRANS1:, YWOut0Asyn, T1_Yn_Out_Word, 0, Read, asynInt32}
}
file "../../db/statistics.template" { pattern 
{P, R, PORT, SCAN}
{CIS:TRANS1:, YWOut0St, T1_Yn_Out_Word, "10 second"}
}
file "../../db/poll_delay.template" { pattern 
{P, R, PORT}
{CIS:TRANS1:, YWOut0PollDelay, T1_Yn_Out_Word}
}

and this is log file
[sjr@localhost ~]$ caget CIS:TRANS1:YWInA
CIS:TRANS1:YWInA 200
[sjr@localhost ~]$ caput CIS:TRANS1:YWOutA 250
Old : CIS:TRANS1:YWOutA 200
New : CIS:TRANS1:YWOutA 250
[sjr@localhost ~]$ caget CIS:TRANS1:YWInA
CIS:TRANS1:YWInA 250
[sjr@localhost ~]

there is need to display value of CIS:TRANS1:YWInA after change scale via using medm.
(ex. if received data from plc is 200, need to display 2.00 )
and also need to send user-input data to PLC after change scale
(ex. if user input 5.00 , need to send 500 to plc)

I need some hints for solve this problem.

regards,
JaeRyong

Attachment: Trans1.adl_043.png
Description: PNG image


Replies:
RE: problem scale word data Mark Rivers

Navigate by Date:
Prev: epics for Aerotech A3200 peter.leicester
Next: RE: problem scale word data Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: epics for Aerotech A3200 Kurt Goetze
Next: RE: problem scale word data Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·