Experimental Physics and
| |||||||||||||||||
|
Thanks for the help Andrew and Ralph! This monitor style works as you say(changes below). It was confusing when I put a camonitor on RX.A it only shows the latest array --but doesn't update as new data arrives. Subsequent cagets of RX.A would show the new data. Also, a camonitor on RX didn't update and I assumed it should if the timestamp and TIME field were updating. When I set RX.TPRO to 1, I saw the record is processed every time TX processes. I added a routine on RX.SNAM and everything is working fine. Is there an easy way to measure statistics (flight time and jitter) of a modest payload? We're trying to see if we can meet a 200 usec requirement to send corrections from our wavefront sensor to our secondary mirror. We have 1 Gb network switches. This is currently accomplished with reflected memory hardware (VMIC 5588). -Matt =====Setting RX.TPRO 1 Confirmed the RX processed every time TX processed===== #seq sncxxx,"user=mrippa"
epics> epics> epics> scanOnce: dbProcess of 'test:RX' scanOnce: dbProcess of 'test:RX' scanOnce: dbProcess of 'test:RX' scanOnce: dbProcess of 'test:RX' ... ===========IOC A============== record(aSub,"test:TX")
{ field(INAM,"TxInit") field(SNAM,"TxTransmit") field(FTVA,"DOUBLE") field(NOVA,"10") field(SCAN,"1 second") } static long TxInit(aSubRecord *precord)
{ srand ( time ( NULL)); if (mySubDebug) printf("Record %s called myAsubInit(%p)\n", precord->name, (void*) precord); return 0; } static long TxTransmit(aSubRecord *precord) { for (int i=0; i<10; i++) testArray[i] = (double)rand()/RAND_MAX*2.0-1.0;//float in range -1 to 1 memcpy(precord->vala, testArray, 10*sizeof(double)); if (mySubDebug) printf("Record %s called myAsubProcess(%p): ta10=%f\n", precord->name, (void*) precord, testArray[9] ); return 0; } ===========IOC B============== record(aSub,"test:RX") {
field(SNAM, "receiver") field(FTA, "DOUBLE") field(FTVA, "DOUBLE") field(NOA, "10") field(NOVA, "10") field(INPA, "test:TX.VALA CPP NMS") } long receiver(aSubRecord *prec) { double sum=0.0, *a; a = (double *)prec->a; /*sum goes to output valb*/ for(int i=0; i<prec->noa; i++) sum += a[i]; * (double *) prec->valb = sum; /*copy input A to output VALA*/ memcpy(prec->vala, (double *)prec->a, 10 * sizeof(double)); //printf("success: %f\n", sum); return 0; } On Thu, Jul 27, 2023 at 10:51 AM Ralph Lange via Tech-talk <tech-talk at aps.anl.gov> wrote:
| ||||||||||||||||
ANJ, 31 Jul 2023 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |