ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
11-16-2009 06:19 PM
I have been using the EPICS server and client in LV 2009 and have encountered a number of problems. Here is a summary, with ZIP file attached. Any help will be appreciated.
Booleans published by the server can be read by the client but not written by the client.
I can't figure out how to access any of the fields except the VAL field for any record. The documentations says they can be accessed and they show up on the server, but I can't get the client to access them. If I add a field to the client record and bind it to a variable I get no value for any field except \VAL.
Arrays have problems. I set the environment variable EPICS _CA_MAX_ARRAY_BYTES to be 65536, and it seems that LabVIEW makes every EPICS array that size, even when I only want a few values. In the attached example with an array filled with 3 values, the server writes 3 to NELM, but the client has no way of getting that. The whole 64K array comes across, with mostly zeros. The client has no way to tell how many values are valid and how many are not.
When trying to write an array from client to server a similar problem is encountered. If I only write 3 values the array never gets transmitted back to the server. If I write all 64K bytes it gets transmitted, but there is no way to tell the server that only the first few values matter. This seems very inefficient. Of course I could use a separate PV for each array to indicate how many values it contains, but this is a pain, and the NELM field is already there for that purpose.
I have some images that I need to transmit, and these will be large arrays, so I might have to increase the max size to hundreds of Kbytes, but I don't want to have to send hundreds of thousands of zeros every time I send a 4-element array.
I could not write the Int32 or U32 array from client to server, but the DBL array worked fine. The Int32 array was telling me that the shared variable on the client had no value, even when I wrote thousands of elements over and over. I just don’t understand.
The updating of the data is erratic. At 10 Hz the values were not being posted
in a timely manner, resulting in delays followed by bursts while the server
catches up. This erratic updating is very annoying visually and means that you
can' t be sure that different displays are synchronized. It may be related to
having to publish so many large arrays needlessly. I have been using the SNS/Oak Ridge shared-memory interface to LabVIEW and it has itw own set of problems, but I can set the size of the arrays to be no larger than necessary and it updates reliably and regularly at 10 Hz. That tells me that the data rate is not excessive (if only the necessary data is sent withouta zillion extra zeros) and that the client is capable of handling the update rate.
11-25-2009 12:51 PM
Hello Richard,
Booleans published by the server can be read by the client but not written by the client.
Do you have the correct permissions set on the variables? (Are they Read only, Write only, or Read/Write?)
Are you trying to do any logging of the shared variables within DSC?
11-25-2009 02:19 PM
Charlie,
Thanks for the interest. I thought this message had been forgotten. I do have Read/Write permissions set, and I am not doing any logging. I tested this by changing the data type from Boolean to Int32 without doing anythign else, and then I was able to write as well as read from the client. Changed back to Boolean and no luck. This one is the least serious of my problems. I have just abandoned Booleans and use integers as 1 or 0 instead. The array problem is much more serious for me.
Richard
09-30-2010 01:54 PM
Sorry to bring back this old thread but I am trying to use the EPICS I/O server and seem to also have issues with a boolean record type. In my case I can't even read from it. The error using caget is attached.
I am also curious how we could access other fields of the record. The manual says we can, but that doesn't seem to be true:
http://zone.ni.com/reference/en-XX/help/371618E-01/lvmve/using_epics_s_serv/
Help would be appreciated.
09-30-2010 07:31 PM
I don't know about that particular error you received. I have several EPICS servers and clients running nicely under LabVIEW 2009, although I have to stay within the restrictions I listed in the original message. I don't use Booleans at all and don't try to pass large arrays. I was told that the issues I reported were known problems that would be fixed in the future. I have the disks for LV 2010 but I haven't gotten the time or courage to install it and see if these things were fixed in it. I see that they did add a bunch of vis for programmatically adding/removing PVs and starting/stopping EPICS servers. Those features might be nice, but supporting all the data types and fields within the record are a much higher priority for me.
10-14-2010 01:16 PM
I have now had a chance to play with EPICS in LabVIEW 2010, and some problems have been fixed, but not all. You can now read and write Booleans. The server sets NELM properly for arrays so that clients can tell how many real elements are in the PV. Writing arrays from client to server is still problematical. For DOUBLE arrays, the client must fill the whole array with values in order for it to get transmitted. The client can't write to NELM, so the array must be filled to the max array size set in the enviromnent variable, which can be hundreds of KBytes. That size must be filled even if you only want to transfer an array with a small number of elements. For Int32 arrays I could not get anything sent from client to server no matter what I tried.
I would like to be able to use the other attributes of PVs, such as the limits and alarm status and severity, but there seems to be no way to write to these, only read them. The alarm status is worthless if I can't set the limit at which the alarm goes off! I need to be able to write to HIHI, HIGH, LOW, LOLO from the server so that the clients can read status that is meaningful. Ability to change these from the client side would also be very handy. If the client could write to NELM it might solve the array problem mentioned above.