-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathezcaIDLRef.html
executable file
·2314 lines (1841 loc) · 70.6 KB
/
ezcaIDLRef.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- This file was generated by mk_html_help.pro -->
<html>
<head>
<TITLE>Extended IDL Help</TITLE>
</head>
<body>
<H1>Extended IDL Help</H1>
<P>
This page was created by the IDL library routine
<CODE>mk_html_help</CODE>. For more information on
this routine, refer to the IDL Online Help Navigator
or type: <P>
<PRE> ? mk_html_help</PRE><P>
at the IDL command line prompt.<P>
<STRONG>Last modified: </STRONG>Wed Dec 12 12:28:55 2012.<P>
<HR>
<A NAME="ROUTINELIST">
<H1>List of Routines</H1></A>
<UL>
<LI><A HREF="#ADD_CAPENDEVENT">ADD_CAPENDEVENT</A>
<LI><A HREF="#CACHECKMONITOR">CACHECKMONITOR</A>
<LI><A HREF="#CACLEARMONITOR">CACLEARMONITOR</A>
<LI><A HREF="#CADEBUG">CADEBUG</A>
<LI><A HREF="#CAENDGROUP">CAENDGROUP</A>
<LI><A HREF="#CAERROR">CAERROR</A>
<LI><A HREF="#CAGET">CAGET</A>
<LI><A HREF="#CAGETARRAY">CAGETARRAY</A>
<LI><A HREF="#CAGETCONTROLLIMITS">CAGETCONTROLLIMITS</A>
<LI><A HREF="#CAGETCOUNTANDTYPE">CAGETCOUNTANDTYPE</A>
<LI><A HREF="#CAGETENUMSTRINGS">CAGETENUMSTRINGS</A>
<LI><A HREF="#CAGETERROR">CAGETERROR</A>
<LI><A HREF="#CAGETGRAPHICLIMITS">CAGETGRAPHICLIMITS</A>
<LI><A HREF="#CAGETPRECISION">CAGETPRECISION</A>
<LI><A HREF="#CAGETRETRYCOUNT">CAGETRETRYCOUNT</A>
<LI><A HREF="#CAGETSTATUS">CAGETSTATUS</A>
<LI><A HREF="#CAGETTIMEOUT">CAGETTIMEOUT</A>
<LI><A HREF="#CAGETUNITS">CAGETUNITS</A>
<LI><A HREF="#CAINIT">CAINIT</A>
<LI><A HREF="#CAMONITOR">CAMONITOR</A>
<LI><A HREF="#CAPENDEVENT">CAPENDEVENT</A>
<LI><A HREF="#CAPENDIO">CAPENDIO</A>
<LI><A HREF="#CAPUT">CAPUT</A>
<LI><A HREF="#CAPUTARRAY">CAPUTARRAY</A>
<LI><A HREF="#CASCAN">CASCAN</A>
<LI><A HREF="#CASEARCH">CASEARCH</A>
<LI><A HREF="#CASETMONITOR">CASETMONITOR</A>
<LI><A HREF="#CASETRETRYCOUNT">CASETRETRYCOUNT</A>
<LI><A HREF="#CASETTIMEOUT">CASETTIMEOUT</A>
<LI><A HREF="#CASTARTGROUP">CASTARTGROUP</A>
<LI><A HREF="#CATIMESTAMP">CATIMESTAMP</A>
<LI><A HREF="#CATRACE">CATRACE</A>
<LI><A HREF="#CAVERSION">CAVERSION</A>
<LI><A HREF="#CAWIDGETADJUST">CAWIDGETADJUST</A>
<LI><A HREF="#CAWIDGETCLEARMONITOR">CAWIDGETCLEARMONITOR</A>
<LI><A HREF="#CAWIDGETSETMONITOR">CAWIDGETSETMONITOR</A>
<LI><A HREF="#EZCAPVNAMETOBYTE">EZCAPVNAMETOBYTE</A>
<LI><A HREF="#EZCASTRINGTOBYTE">EZCASTRINGTOBYTE</A>
<LI><A HREF="#RELEASE NOTES">RELEASE NOTES</A>
</UL><P>
<HR>
<H1>Routine Descriptions</H1>
<A NAME="ADD_CAPENDEVENT">
<H2>ADD_CAPENDEVENT</H2></A>
<A HREF="#CACHECKMONITOR">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
add_caPendEvent
PURPOSE:
This routine start an IDL widget of sending channel access
ca_pend_event call with the user specifyable timer interval.
Calling this rountine is required for IDL CA sesstion EPICS 3.14.4
otherwize many CA warning message will be printed on user's IDL
interactive terminal.
CATEGORY:
Widgets
CALLING SEQUENCE:
add_caPendEvent,timer=timer
KEYWORD:
timer: Specify the timer in seconds between each ca_pend_event call
It defaults to 10 seconds.
EXAMPLE:
IDL> add_caPendEvent
</PRE><P>
<STRONG>(See ezcaIDLWidgets.pro)</STRONG><P>
<HR>
<A NAME="CACHECKMONITOR">
<H2>CACHECKMONITOR</H2></A>
<A HREF="#ADD_CAPENDEVENT">[Previous Routine]</A>
<A HREF="#CACLEARMONITOR">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caCheckMonitor
PURPOSE:
This function returns a non-zero value if there is a new (unread)
monitor for this process variable, otherwise it returns zero.
This function is particularly useful when a caGet() operation is
expensive in time, e.g. reading large arrays.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
state = caCheckMonitor(pvname)
INPUTS:
pvname: The name of the process variable on which to check the monitor.
OUTPUTS:
The function return value is zero if no new monitor value is available,
and non-zero if a new monitor value is available.
PROCEDURE:
This routine uses ezcaNewMonitorValue(). The "type" parameter required
by ezcaNewMonitorValue() is the native EZCA data type as determined
by caGetCountAndType().
EXAMPLES:
IDL> state = caCheckMonitor('test_ao1',event)
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CACLEARMONITOR">
<H2>CACLEARMONITOR</H2></A>
<A HREF="#CACHECKMONITOR">[Previous Routine]</A>
<A HREF="#CADEBUG">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caClearMonitor
PURPOSE:
This procedure clears a monitor on the specified process variable.
It cancels the effect of caSetMonitor().
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
status = caClearMonitor(pvname)
INPUTS:
pvname: The name of the process variable on which to clear the monitor.
OUTPUTS:
The function return value of caClearMonitor is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists) and non-zero if the routine failed.
PROCEDURE:
This routine uses ezcaClearMonitor(). The "type" parameter required
by ezcaClearMonitor is the native EZCA data type as determined
by caGetCountAndType().
EXAMPLES:
IDL> status = caClearMonitor('test_ao1')
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CADEBUG">
<H2>CADEBUG</H2></A>
<A HREF="#CACLEARMONITOR">[Previous Routine]</A>
<A HREF="#CAENDGROUP">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caDebug
PURPOSE:
This procedure turns the EZCA debugging flag on or off. Turning on
the debugging flag prints lots of information, which is mainly
useful to developers.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
caDebug, state
INPUTS:
state: state=1 turns debugging on, state=0 turns debugging off.
OUTPUTS:
None
PROCEDURE:
This routine uses ezcaDebugOn() and ezcaDebugOff().
EXAMPLES:
IDL> caDebug, 1 ; Turn on debugging
setting Debug
IDL> status = caGet('test_ao1', value)
ca_pend_event(0.000010)
--start end-of-prologue() report
****** Start State:
AutoErrorMessage T InGroup F Debug T Trace F ErrorLocation LastOnly ListPrint
LastOnly TimeoutSeconds 0.050000
Workp : 9cf970 trashme F (nxt 0)
Channel_avail_hdr 0 :
...
...
IDL> caDebug, 0 ; Turn off debugging
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAENDGROUP">
<H2>CAENDGROUP</H2></A>
<A HREF="#CADEBUG">[Previous Routine]</A>
<A HREF="#CAERROR">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caEndGroup
PURPOSE:
This function ends an "asynchronous group". See caStartGroup for more
information on asynchronous groups.
caEndGroup flushes the queue of caGet and caPut calls and waits for
replies from the channel access servers.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
stat = caEndGroup(status)
INPUTS:
None.
OUTPUTS:
The function return value is 0 if the operation was successful,
otherwise it is the first encountered non-successful return code.
The optional status parameter can be used to return the status code
of each operation in the group.
OPTIONAL OUTPUT PARAMETERS:
status: If this optional parameter is present then it returns a
array of status information, one for each channel access
call in the group.
COMMON BLOCKS:
EZCA_COMMON contains a flag (ingroup) which indicates if we
are currently in an asynchronous group. This routine clears that flag.
PROCEDURE:
If the status parameter is present then this routine uses
ezcaEndGroupWithReport(). If the parameter is not present then
the routine calls ezcaEndGroup().
RESTRICTIONS:
When the status parameter is present, and ezcaEndGroupWithReport() is
called, there is no way to know in advance how many status values
will be returned. This routine passes a status array with 1024
elements, and then truncates it to the actual length. The maximum
number of status values which can be retrieved is thus 1024. No errors
will occur if an asynchronous group has more than 1024 calls, but
only the first 1024 status values can be obtained.
This is probably sufficient for most applications!
EXAMPLES:
IDL> caStartGroup
IDL> status = caget('test_ao1.SCAN', scan)
IDL> status = caget('test_mca1.ERTM', ertm)
IDL> ; Print out values - they will be zero.
IDL> help, scan, ertm
IDL> status = caEndGroup()
IDL> ; Print out values after executing caEndGroup, they are non-zero
IDL> help, scan, ertm
Output:
SCAN INT = 0
ERTM FLOAT = 0.000000
SCAN INT = 6
ERTM FLOAT = 7.10000
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAERROR">
<H2>CAERROR</H2></A>
<A HREF="#CAENDGROUP">[Previous Routine]</A>
<A HREF="#CAGET">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caError
PURPOSE:
This procedure controls error printing and returns error strings.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
caError, err_string, /ON, /OFF, /PRINT, prefix=prefix
INPUTS:
None
KEYWORD PARAMETERS:
/ON
Setting this switch turns on automatic error message printing
on stdout. Automatic printing is initially enabled.
/OFF
Setting this switch turns off automatic error message printing
on stdout.
/PRINT
Setting this switch prints the last error message on stdout.
prefix=prefix
The prefix keyword can be used to pass a string which is prefixed
to error messages printed with /PRINT or fetched via the optional
output parameter.
OPTIONAL OUTPUT PARAMETERS:
err_string:
If this parameter is present then it will contain the text of the
last error message.
COMMON BLOCKS:
EZCA_COMMON contains a flag (ingroup) which indicates if we
are currently in an asynchronous group. This routine tests that flag.
PROCEDURE:
This routine uses ezcaPerror(), ezcaAutoErrorMessageOn(),
ezcaAutoErrorMessageOff(), and ezcaGetErrorString()
EXAMPLE:
IDL> ; Define a prefix and turn on error messages
IDL> caError, prefix='My program', /ON
IDL> ; Fetch the last error message
IDL> caError, err_string
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGET">
<H2>CAGET</H2></A>
<A HREF="#CAERROR">[Previous Routine]</A>
<A HREF="#CAGETARRAY">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGet
PURPOSE:
This function reads the value of a Channel Access process variable.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
Status = caGet(pvname, value, /string, max=n)
INPUTS:
pvname: The name of the process variable for which the value is to
be returned.
KEYWORD PARAMETERS:
STRING: Set this flag to force caGet to return a string, rather than
a number. This flag is particularly useful when the native
channel access data type is ENUM (3), since the string is
more descriptive than the number.
MAX_ELEMENTS: This keyword parameter is used to limit the number of
values returned by caGet. caGet normally returns the native
element count for a process variable. Setting MAX to a
number less than this will cause caGet to return only the
first MAX values in the array.
OUTPUTS:
value: The value of the process variable. By default, caGet returns
"value" with the native data type and number of elements
of the process variable. It determines this information by
calling caGetCountAndType(). Note that if caGet is called
after calling caStartGroup but before calling caEndGroup then
the IDL variable "value" is created, but will not actually
contain the data until caEndGroup is called.
The function return value of caGet is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists) and non-zero if the routine failed. If caGet is called from
within an asynchronous group then the status return only indicates
whether the operation was successfully queued.
COMMON BLOCKS:
EZCA_COMMON contains a flag (ingroup) which indicates if we
are currently in an asynchronous group. This routine tests that flag.
SIDE EFFECTS:
This routine will causes a channel access search to take place if
this is the first time this process variable has been referenced. It
performs a ca_get, unless called as part of an asynchronous group.
RESTRICTIONS:
There are two important restrictions which must be kept in mind when
calling caGet from inside a "group", i.e. after calling caStartGroup
and before calling caEndGroup.
1) The IDL "value" variable (i.e. the second parameter
passed to caGet) must not be "re-used" or deleted before the call to
caEndGroup. The reason for this is that EZCA has been passed the
address of this variable as the location in which the data is to be
copied when caEndGroup is called. Thus, this location must still
point to a valid memory location when caEndGroup is called.
If the "value" variable is re-used then IDL's behavior is
unpredictable, and bus errors/access violations could occur.
2) When using caGet to read strings, the data type returned will be
a byte array, rather than a string. The reason has to do with the
manner in which IDL passes strings, which requires that EZCA actually
be passed pointers to byte arrays. When caGet is called outside of a
group it automatically converts the byte array to a string before
returning the value. However when caGet is called inside of a group
it cannot perform this conversion, since it cannot be done until after
the data is read, which does not occur until caEndGroup is called.
Thus, it is the user's responsibility to convert the data from a byte
array to a string after calling caEndGroup. This is done very simply
with the string() function. For more information see the example below.
PROCEDURE:
This routine uses ezcaGet().
EXAMPLES:
IDL> ; The following is an example of a single caGet
IDL> status = caGet('test_mca1.VAL', value)
IDL> ; The following is an example of a valid grouped operation
IDL> ; It also shows how to handle strings.
IDL> caStartGroup
IDL> status = caGet('test_mca1.VAL', mca_value)
IDL> status = caGet('test_vme1.DESC', vme_desc) ; This is a string PV
IDL> status = caEndGroup()
IDL> vme_desc = string(vme_desc) ; Convert from byte array to string
IDL> ; The following is an example of an INVALID grouped operation
IDL> caStartGroup
IDL> status = caGet('test_mca1.VAL', mca_value)
IDL> status = caGet('test_vme1.VAL', vme_value)
IDL> mca_value=0
IDL> ; We have redefined mca_value, so the previous location is
IDL> ; undefined. NO NOT DO THIS!
IDL> status = caEndGroup()
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETARRAY">
<H2>CAGETARRAY</H2></A>
<A HREF="#CAGET">[Previous Routine]</A>
<A HREF="#CAGETCONTROLLIMITS">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetArray
PURPOSE:
This function reads values for a list of Channel Access process
variable. It returns 0 if successful, returns -1 if failed.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
Status = caGetArray(names,pdata,max=no,type=i,/TYPE,/EVENT)
INPUTS:
names: The variable for a list of channel access PV names for which
the array of data is to be returned.
KEYWORD PARAMETERS:
MAX: Default to 1 for a list of PV names. If more than one values
to be returned for a list of array type PV names, this keyword
must be specified. If the `no' specified is greater than the
native count, zeros will be padded in the output array.
If only one PV name is input, then caGetArray returns
the native element count for the process variable. Setting
MAX to a number less than the native count this will cause
caGetArray to return only the first MAX values for the PV.
TYPE: This keyword specifies the IDL data type to be returned by
the output array. If not specified, it defaults to 5, i.e.
double precision type of data will be returned by the
output array.
1 - byte 2 - short 3 - long 4 - float
5 - double 7 - string
/TYPE Instead of type=i a user can use the IDL data type keyword
directly, the data type keyword supercedes the type=i
specification. Valid types given below
/double
/float
/string
/long
/short
/byte
/EVENT If specified use the ca_array_get_callback otherwise use
the ca_array_get
OUTPUTS:
pdata: The output variable, pdata(max,noNames), returns the data
array for the requested list of PV names. The `max' is the no
of values specified by the keyword MAX, the `noNames' is the
number of PV names in the input variable names.
COMMON BLOCKS:
None.
SIDE EFFECTS:
This routine will causes a channel access search to take place if
this is the first time this process variable has been referenced.
RESTRICTIONS:
Only one type of data can be requested for a list of PV names.
PROCEDURE:
This routine uses Ezca_getArray() from the EzcaScan library.
EXAMPLES:
Three examples are given below.
The first caGetArray call returns only the first value for each PV
name, the second and third caGetArray call both returns 10 float
values for each PV name
IDL> names=['chademowf7','chademowf8']
IDL> st = caGetArray(names,pdata)
IDL> st = caGetArray(names,pdata,max=10,/float)
IDL> st = caGetArray(names,pdata,max=10,type=4)
MODIFICATION HISTORY:
Written by: Ben-chin Cha Dec, 1995
04-11-96 bkc If array get failed, only the pvnames not found are
reported
04-22-96 bkc Replace caError by caGetError
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETCONTROLLIMITS">
<H2>CAGETCONTROLLIMITS</H2></A>
<A HREF="#CAGETARRAY">[Previous Routine]</A>
<A HREF="#CAGETCOUNTANDTYPE">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetControlLimits
PURPOSE:
This procedure reads the control limits for the specified channel
access process variable.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
status = caGetControlLimits(pvname, low, high)
INPUTS:
pvname: The name of the process variable from which to read the
control limits.
OUTPUTS:
low: The low control limit (double).
high: The high control limit (double).
The function return value of caGetControlLimits is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists) and non-zero if the routine failed.
PROCEDURE:
This routine uses ezcaGetControlLimits().
EXAMPLE:
IDL> status = caGetControlLimits('test_ao1', low, high)
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETCOUNTANDTYPE">
<H2>CAGETCOUNTANDTYPE</H2></A>
<A HREF="#CAGETCONTROLLIMITS">[Previous Routine]</A>
<A HREF="#CAGETENUMSTRINGS">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetCountAndType
PURPOSE:
This function returns the number of elements and data type of a
Channel Access process variable.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
Status = caGetCountAndType(pvname, count, type)
INPUTS:
pvname: The name of the process variable for which information is to
be returned.
OUTPUTS:
count: The number of elements in the process variable. This is 1 for
scalar process variables and more than 1 for arrays.
type: This is a 3 element array containing information about the data
type of the process variable.
type(0) = Channel access data type as defined in "cadef.h"
type(1) = EZCA data type as defined in "ezca.h"
type(2) = IDL/PV-WAVE data type as defined in size()
These data types are as follows:
Name Channel Access EZCA IDL/PVWAVE
String 0 1 7
Short 1 2 2
Float 2 4 4
Enum 3 2 (short) 2 (short)
Byte 4 0 1
Long 5 3 3
Double 6 5 5
The function return value of caGetCountAndType is a status value. The
status is 0 if the routine was successful (i.e. the process variable exists)
and non-zero if the routine failed.
SIDE EFFECTS:
This routine will cause a Channel Access search to take place if this is
the first time this process variable has been referenced.
RESTRICTIONS:
The channel access data type enum is mapped to EZCA and IDL short
data types. However, application programs can use this routine to
determine if the native channel access data type is enum, and then
use caGet(pvname, value, /string) to read the string equivalent of the
process variable. Programs can also use
caGetEnumStrings(pvname, strings) to read the strings for the all of
the possible values of an enum process variable.
PROCEDURE:
This routine uses ezcaPvToChid() and then ca_element_count() and
ca_field_type().
Note that this routine always returns its values "immediately", even
if it is called between a caStartGroup and caEndGroup.
EXAMPLE:
IDL> status = caGetCountAndType('test_mca1.VAL', count, type)
IDL> print, status
0 ; Status = success
IDL> print, count
2048 ; Array with 2048 elements
IDL> print, type
5 3 3 ; Long data type
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETENUMSTRINGS">
<H2>CAGETENUMSTRINGS</H2></A>
<A HREF="#CAGETCOUNTANDTYPE">[Previous Routine]</A>
<A HREF="#CAGETERROR">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetEnumStrings
PURPOSE:
This function returns all of the choice strings associated with a
Channel Access "enum" process variable. It is particularly useful
for building menus of options.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
Status = caGetEnumStrings(pvname, strings)
INPUTS:
pvname: The name of the process variable for which the enum strings
are to be returned. The native channel access data type of
this process variable must be enum (3).
OUTPUTS:
strings: A string array containing the strings for each possible
value of the enum variable.
The function return value of caGetEnumStrings is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists and is of type enum) and non-zero if the routine failed.
SIDE EFFECTS:
This routine causes a channel access read. It does not use the
grouping mechanism of EZCA, i.e. it always executes immediately.
RESTRICTIONS:
There must be less than MAX_ENUM_STATES enum strings and they must each be
less than MAX_STRING_SIZE characters.
PROCEDURE:
This routine uses ezcaPvToChid and then ca_get() with a request type
of DBR_GR_ENUM. The functionality required by this routine is not
presently provided directly in EZCA, although it should probably be
added.
EXAMPLES:
IDL> status = caGetEnumStrings('test_mca1.SCAN', strings)
IDL> for i=0, n_elements(strings)-1 do print, strings(i)
Passive
Event
I/O Intr
10 second
5 second
2 second
1 second
.5 second
.2 second
.1 second
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETERROR">
<H2>CAGETERROR</H2></A>
<A HREF="#CAGETENUMSTRINGS">[Previous Routine]</A>
<A HREF="#CAGETGRAPHICLIMITS">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetError
PURPOSE:
This function get CA return codes for a list of process variable names.
Return code can be 0 or -1, 0 for success, -1 for failure.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
Status = caGetError(Pvname,Err)
INPUTS:
Pvname: The variable for a list of process variables for which the
channel access return code to be checked.
KEYWORD PARAMETERS:
None.
OUTPUTS:
Err: The corresponding return code(s) for the Pvname(s) are returned.
Returns array of 0 or 1. 0 indicates success, 1 indicates failed.
COMMON BLOCKS:
None.
SIDE EFFECTS:
This routine will causes a channel access search to take place if
this is the first time pvnames has been referenced.
RESTRICTIONS:
None.
PROCEDURE:
This routine uses Ezca_get_error_array() from the EzcaScan library.
EXAMPLES:
IDL> print,caGetError('chademoai1')
IDL> x = ['chademoai1','chademoai2']
IDL> status = caGetError(x)
MODIFICATION HISTORY:
Written by: Ben-chin Cha Dec, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETGRAPHICLIMITS">
<H2>CAGETGRAPHICLIMITS</H2></A>
<A HREF="#CAGETERROR">[Previous Routine]</A>
<A HREF="#CAGETPRECISION">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetGraphicLimits
PURPOSE:
This procedure reads the graphic limits for the specified channel
access process variable.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
status = caGetGraphicLimits(pvname, low, high)
INPUTS:
pvname: The name of the process variable from which to read the
graphic limits.
OUTPUTS:
low: The low graphic limit (double).
high: The high graphic limit (double).
The function return value of caGetGraphicLimits is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists) and non-zero if the routine failed.
PROCEDURE:
This routine uses ezcaGetGraphicLimits().
EXAMPLE:
IDL> status = caGetGraphicLimits('test_ao1', low, high)
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETPRECISION">
<H2>CAGETPRECISION</H2></A>
<A HREF="#CAGETGRAPHICLIMITS">[Previous Routine]</A>
<A HREF="#CAGETRETRYCOUNT">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetPrecision
PURPOSE:
This procedure reads the precision for the specified channel
access process variable.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
status = caGetPrecision(pvname, precision)
INPUTS:
pvname: The name of the process variable from which to read the
precision.
OUTPUTS:
precision: The precision (short).
The function return value of caGetPrecision is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists) and non-zero if the routine failed.
PROCEDURE:
This routine uses ezcaGetPrecision().
EXAMPLE:
IDL> status = caGetPrecision('test_ao1', precision)
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETRETRYCOUNT">
<H2>CAGETRETRYCOUNT</H2></A>
<A HREF="#CAGETPRECISION">[Previous Routine]</A>
<A HREF="#CAGETSTATUS">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetRetryCount
PURPOSE:
This function returns the value of the EZCA retry count parameter.
In conjunction with the EZCA Timeout parameter it determines how
long EZCA will try to connect to a process variable before giving up.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
RetryCount = caGetRetryCount()
INPUTS:
None.
OUTPUTS:
The function return value of caGetRetryCount is the integer
value of the EZCA RetryCount parameter.
PROCEDURE:
This routine uses ezcaGetRetryCount().
EXAMPLES:
IDL> print, caGetRetryCount()
599
MODIFICATION HISTORY:
Written by: Mark Rivers
June 28, 1995
</PRE><P>
<STRONG>(See ezcaIDL.pro)</STRONG><P>
<HR>
<A NAME="CAGETSTATUS">
<H2>CAGETSTATUS</H2></A>
<A HREF="#CAGETRETRYCOUNT">[Previous Routine]</A>
<A HREF="#CAGETTIMEOUT">[Next Routine]</A>
<A HREF="#ROUTINELIST">[List of Routines]</A>
<PRE>
NAME:
caGetStatus
PURPOSE:
This procedure reads the status parameters for a channel access
process variable.
CATEGORY:
EPICS Channel Access Interface
CALLING SEQUENCE:
status = caGetStatus(pvname, timestamp, status, severity)
INPUTS:
pvname: The name of the process variable from which to read the
status parameters.
OUTPUTS:
timestamp: The timestamp of the last time the record was processed
lonarr(2).
status: The status flag (int).
severity: The severity flag (int).
The function return value of caGetStatus is a status value. The
status is 0 if the routine was successful (i.e. the process variable
exists) and non-zero if the routine failed.
PROCEDURE:
This routine uses ezcaGetStatus().
EXAMPLE: