Experimental Physics and
| |||||||||||||||
|
I'm poking around the example IOC I've created with: $ makeBaseApp.pl -t example app1 $ makeBaseApp.pl -i -t example app1 Example runs fine and records are behaving as expected, but.. I tried to experiment with subRecord, but the mySubProcess routine does not seem to get values on INPx fields if they are not constants. I've added following line to get INPA value inside the C function: static long mySubProcess(subRecord *precord) { if (mySubDebug) printf("Record %s called mySubProcess(%p)\n", precord->name, (void*) precord); printf("precord->a %lf\n", precord->a); printf("precord->b %lf\n", precord->b); return 0; } Example: record(sub,"$(user):subExample") { field(INAM,"mySubInit") field(SNAM,"mySubProcess") field(INPA, "$(user):subInc") field(INPB, "123") } record(calc, "$(user):subInc") { field(SCAN, "1 second") field(VAL, "0") field(CALC, "(A+1)") field(INPA, "$(user):subInc.VAL NPP") } Output from IOC: Record hinkoHost:subcall called mySubProcess(0x9205998) precord->a 0.000000 precord->b 123.000000 Record hinkoHost:subcall called mySubProcess(0x9205998) precord->a 0.000000 precord->b 123.000000 Record hinkoHost:subcall called mySubProcess(0x9205998) precord->a 0.000000 precord->b 123.000000
What am I missing? Best regards, Hinko -- Hinko Kocevar Technical support software engineer Instrumentation Technologies d.d. Velika pot 22, SI-5250 Solkan - Slovenia T:+386 5 3352600, F:+386 5 3352601 mailto: [email protected] http://www.i-tech.si - When your users demand stability The information transmitted is intended solely for the addressee and may contain confidential and/or privileged information. Any review, retention, disclosure or other use by persons other than the intended recipient is prohibited. If you received this in error, please notify the sender and delete all copies.
| ||||||||||||||
ANJ, 24 Nov 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |