1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 <2010> 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | 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 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: the hex instruction convert |
From: | "Mark Rivers" <[email protected]> |
To: | "Damek Yahto" <[email protected]>, <[email protected]> |
Date: | Tue, 16 Nov 2010 10:18:19 -0600 |
Hi Yahto, There are a number of options for where you build the
strings. Since this is a motor, do you want to treat it like a motor,
with the ability to set the velocity and acceleration, detect limit switches,
have soft limits, etc.? If so, then you should consider using the EPICS motor
record. In that case you would write an asyn driver that constructs the
strings and uses asynOctetSyncIO to send and receive strings from the
underlying drvAsynSerialPort driver. There are a number of examples in the
EPICS “motor” module, including the Newport XPS, PMAC and other drivers. Mark From:
[email protected] [mailto:[email protected]] On Behalf Of Damek Yahto HI
Tech-talk,I am trying to build an IOC to communicate with serial devices
through the serial to Ethernet Device Server. The
serial device supports the streams of hex format. The
binary command format when using RS232 or RS485 is as follows: the
checksum is calculated by adding up all bytes (including the module address
byte) using
//Set the “Command” array to the desired command I want to
control the motor to rotate right through the serial device. Instruction:
By
writing streamDevice protocol file(out'\x01\x01\x00\x01\x00\x00\x01\x5e\x62';),motor will
rotate. Using "EDM" or "caput" to input the
variable,where do I do my processing (like calculating the Checksum and convert
the velocity to four bytes long)? where write my
own parsing code in C?having other approaches. Could you give any example? Thanks, Yahto Dam |