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  2018  <20192020  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  <20192020 
<== Date ==> <== Thread ==>

Subject: RE: about Newport AG-UC module [SEC=UNCLASSIFIED]
From: "POZAR, Andraz via Tech-talk" <tech-talk@aps.anl.gov>
To: "losteria79@gmail.com" <losteria79@gmail.com>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 21 Mar 2019 22:10:49 +0000
Hi,

I needed to add a udev rule to make AG-UC8 work. 
In file /etc/udev/rules.d/10-ag_uc8.rules:

ACTION=="add", ATTRS{idVendor}=="104d", ATTRS{idProduct}=="3000", ATTRS{serial}=="FT1NKHGP", SYMLINK+="Agilis_AG_UC", GROUP="ics", OWNER="ics" RUN+="/sbin/modprobe ftdi_sio" RUN+="/bin/sh -c 'echo 104d 3000 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"

As you can see I also set up a symlink as I have noticed that the controller doesn't always get connected as /dev/ttyUSB0. This way I guarantee that the controller will be accessible on /dev/Agilis_AG_UC. I also set owner and group since I don't run IOC as root.

You can find the serial, idVendor and idProduct by running dmesg. In my case I see this:
[  784.597718] usb 1-1.6: new full-speed USB device number 4 using ehci-pci
[  784.690558] usb 1-1.6: New USB device found, idVendor=104d, idProduct=3000
[  784.691554] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  784.692550] usb 1-1.6: Product: Agilis
[  784.693547] usb 1-1.6: Manufacturer: Newport
[  784.694581] usb 1-1.6: SerialNumber: FT1NKHGP
[  784.713680] usbcore: registered new interface driver ftdi_sio
[  784.714209] usbserial: USB Serial support registered for FTDI USB Serial Device
[  784.714838] ftdi_sio 1-1.6:1.0: FTDI USB Serial Device converter detected
[  784.715396] usb 1-1.6: Detected FT232RL
[  784.716480] usb 1-1.6: FTDI USB Serial Device converter now attached to ttyUSB0

Cheers,
Andraz


Message: 1
Date: Thu, 21 Mar 2019 16:47:43 +0000
From: Mark Rivers <rivers@cars.uchicago.edu>
To: '???' <losteria79@gmail.com>
Cc: "'tech-talk@aps.anl.gov'" <tech-talk@aps.anl.gov>
Subject: RE: about Newport AG-UC module
Message-ID: <db4daaea50ed46179e7d3f36f66ada60@cars.uchicago.edu>
Content-Type: text/plain; charset="utf-8"

Please add these asyn trace commands to your startup script.  Then you will see if there is any communication with the device at all.

drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0)
asynSetTraceIOMask(?serial1?,0,2)
asynSetTraceMask(?serial1?,0,255)

Mark


From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> On Behalf Of ??? via Tech-talk
Sent: Thursday, March 21, 2019 3:06 AM
To: tech-talk@aps.anl.gov
Subject: about Newport AG-UC module

hello
i have newport AG-UC8
i'm used 1channel 2 axis.
before newport suport applet used.
i am now setting to the epics envrionment.
why cannot read version?
i could not solve this.

choi@bl9d:/usr/local/epics/synApps/support/motor-R6-10-1/iocBoot/iocWithAsyn$ ./connect_AG_UC choi@bl9d:/usr/local/epics/synApps/support/motor-R6-10-1/iocBoot/iocWithAsyn$ ls -al /dev/ttyUSB*
crw-rw-rw- 1 root dialout 188, 0 Mar 21 16:33 /dev/ttyUSB0 choi@bl9d:/usr/local/epics/synApps/support/motor-R6-10-1/iocBoot/iocWithAsyn$ ./st.cmd #!../../bin/linux-x86_64/WithAsyn
errlogInit(5000)
# Tell EPICS all about the record types, device-support modules, drivers,etc.
dbLoadDatabase("../../dbd/WithAsyn.dbd")
WithAsyn_registerRecordDeviceDriver(pdbbase)
### Motors
dbLoadTemplate "motor.substitutions.AG_UC"
# For Linux
drvAsynSerialPortConfigure("serial1", "/dev/ttyUSB0", 0, 0, 0)
asynOctetSetInputEos("serial1",0,"\r\n")
asynOctetSetOutputEos("serial1",0,"\r\n")
asynSetOption("serial1",0,"baud","921600")
asynSetOption("serial1",0,"bits","8")
asynSetOption("serial1",0,"stop","1")
asynSetOption("serial1",0,"parity","none")
asynSetOption("serial1",0,"clocal","Y")
asynSetOption("serial1",0,"crtscts","N")
asynSetTraceIOMask("serial1", 0, 2)
# Load asynRecord records
dbLoadRecords("/usr/local/epics/synApps/support/asyn-R4-33/db/asynRecord.db", "P=IOC:,R=serial1,PORT=serial1, ADDR=0,OMAX=256,IMAX=256") # AG_UCCreateController(asyn port, serial port, number of axes, active poll period (ms), idle poll period (ms)) AG_UCCreateController("Agilis1", "serial1", 2, 50, 500) Agilis controller firmware version =
2019/03/21 16:34:34.590 AG_UCController::AG_UCController: cannot read version information from Agilis controller asynSetTraceIOMask("Agilis1", 0, 2) # AG_UCCreateAxis((AG_UC controller port,  axis, hasLimits, forwardAmplitude, reverseAmplitude) AG_UCCreateAxis("Agilis1", 0, 0, 50, -50) AG_UCCreateAxis("Agilis1", 1, 0, 50, -50) iocInit Starting iocInit ############################################################################
## EPICS R3.15.6
## EPICS Base built Mar 13 2019
############################################################################
iocRun: All initialization complete
epics>

--
Choi, Yun Seok
Email losteria79@gmail.com<mailto:losteria79@gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.aps.anl.gov/pipermail/tech-talk/attachments/20190321/8b192039/attachment.html>

------------------------------

_______________________________________________
Tech-talk mailing list Tech-talk@aps.anl.gov https://mailman.aps.anl.gov/mailman/listinfo/tech-talk


End of Tech-talk Digest, Vol 13, Issue 143
******************************************

Navigate by Date:
Prev: Re: Many PV connections from CA client Matt Newville via Tech-talk
Next: Gateway Queue William Layne via Tech-talk
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  <20192020 
Navigate by Thread:
Prev: Re: Many PV connections from CA client Matt Newville via Tech-talk
Next: Gateway Queue William Layne via Tech-talk
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  <20192020 
ANJ, 22 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·