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  <20172018  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  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: STB and Serial Trigger for async devGpib vxi11 device support
From: "Niedermayer, Philipp" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 2 Mar 2017 13:51:17 +0000

Hello,

 

I am implementing an EPICS IOC to control a device connected via GPIB to an Keysight E5810 LAN/GPIB Gateway. Therefore I am using devGPIB of the asyn module and connect to the gateway over LAN via the VXI11 Protocol.

 

I am able to send simple commands to the device. However, for a measurement routine a more complex protocol is required by the device. This includes not only sending and receiving binary data but also reading out the status byte (VXI: “Word Serial Read STB”) and sending a trigger (VXI: “Word Serial Trigger”).

 

Therefore I have chosen a GPIBCVTIO command with a custom convert function that takes care of all I/O that the protocol requires. However I cannot figure out how to read the STB and trigger the device.

Below is a draft of the custom I/O function with the missing parts.

 

How can I get the STB and do Serial Triggering?

 

Thanks in advance for your help,

Philipp

 

 

/* file XXXSup/devXXX.c */

//...

 

static int measurement(struct gpibDpvt *pgpibDpvt, int P1, int P2, char **P3) {

 

     size_t count = 0;

 

     // initiate measurement by sending single byte "\x17"

     asynStatus status = pgpibDpvt->pasynOctet->write(

                     pgpibDpvt->asynOctetPvt, pgpibDpvt->pasynUser,

                     "\x17", 1, &count);

 

     // TODO: check that STB equals 0xA to continue (device will not raise SRQ)

    

     // TODO: start measurement by triggering the device (Serial Trigger)

    

     // TODO: check STB:

     //              0x8 --> measurement completed, data ready

     //              0x2 --> error occurred, abort

                    

     // TODO: initiate data sending by triggering the device again

    

     // read data (128 bytes)

     char buffer[128];

     asynStatus status = pgpibDpvt->pasynOctet->read(

                     pgpibDpvt->asynOctetPvt, pgpibDpvt->pasynUser,

                     buffer, 128, &count, 0);

                    

     // DONE

     return 0;

 

}

 

//...

 

static struct gpibCmd gpibCmds[] = {

     //...

{&DSET_SI, GPIBCVTIO, IB_Q_LOW, 0, 0, 0, 0, measurement, 0, 0, 0, 0, 0},

};

 

//...

 

 

 



------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


Replies:
RE: STB and Serial Trigger for async devGpib vxi11 device support Mark Rivers
Re: STB and Serial Trigger for async devGpib vxi11 device support Eric Norum

Navigate by Date:
Prev: RE: RE: RE: Re: IOC Connecting Problem Mark Rivers
Next: RE: STB and Serial Trigger for async devGpib vxi11 device support Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: PCASpy 0.6.3 Wang Xiaoqiang (PSI)
Next: RE: STB and Serial Trigger for async devGpib vxi11 device support Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·