Experimental Physics and
| |||||||||||||||
|
I am currently developing an IOC to drive a DC current supply via Modbus/TCP. For this purpose I use the Asyn/Modbus device support. My IOC currently runs on a Linux PC. I use: EPICS 3.14.9, Modbus 1.1, Asyn 4-9 My IOC receives a consign value from a Motif Slider of an EDM screen. I have a problem with a Read/Write access register used to set and read back the Consign in the DC current supply. From the EDM screen, I change the value of my ConsignRequested record using the Motif Slider. The EDM screen displays the values : - received by the IOC from one side (ConsignRequested record) - the read back value from the other side(ConsignDisplay record). The problem is that sometimes there is a mismatch between the two values !!! After further investigations, it turns out that the last Motif Slider value is received by the IOC and pushed into the ConsignWrite record, but the corresponding Mobus Write request is never sent by the IOC. I use a Waveform (ConsignRead record) to read my Consign register, the scanning is I/O intr. I use another Waveform (ConsignWrite record) to write into this register, the scanning is passive. This problem can occur as soon as I move the slider, but most of the time I have to move it several times. Here is my vdb file: #! Read Consign Path #! Record reading the Consign record(waveform, "$(NOMOP):ConsignRead") { field(DESC, "Read 16bits Reg") field(SCAN, "I/O Intr") field(DTYP, "asynInt32ArrayIn") field(FLNK, "$(NOMOP):ConsignDisplay") field(INP, "@asyn($(PORTIN) 0)MODBUS_DATA") field(FTVL, "LONG") } #! Record used to Display the Consign record(longout, "$(NOMOP):ConsignDisplay") { field(SCAN, "Passive") field(DOL, "$(NOMOP):ConsignRead.VAL") field(OMSL, "closed_loop") field(DRVH, "$(EGU_MAX)") field(DRVL, "$(EGU_MIN)") field(HOPR, "$(EGU_MAX)") field(LOPR, "$(EGU_MIN)") } #! Write Consign Path #! Record receiveing the new consign from EDM via Channel Access record(longin, "$(NOMOP):ConsignRequested") { field(SCAN, "Passive") field(FLNK, "$(NOMOP):ConsignCalc") field(HOPR, "$(EGU_MAX)") field(LOPR, "$(EGU_MIN)") } #! Record that select the 2 most significant bytes record(calcout, "$(NOMOP):ConsignCalc") { field(FLNK, "$(NOMOP):ConsignWrite") field(CALC, "A >> 16") field(INPA, "$(NOMOP):ConsignRequested.VAL") field(OUT, "$(NOMOP):ConsignWrite.VAL") field(SCAN, "Passive") } #! Record that writes the Consign record(waveform, "$(NOMOP):ConsignWrite") { field(SCAN, "Passive") field(DTYP, "asynInt32ArrayOut") field(INP, "@asyn($(PORTOUT) 0)MODBUS_DATA") field(FTVL, "LONG") } Here is what I do in my startup script for the Modbus communication: # Physical Link Declaration drvAsynIPPortConfigure("LB-DIA-ALB-TST2","172.16.59.60:502",0,1,1) # Interpose Modbus/TCP Declaration modbusInterposeConfig("LB-DIA-ALB-TST2",2,0,300) # Declaration of functions used by ModBus Client drvModbusAsynConfigure("LB-DIA-ALB-TST2:Read_6_1", "LB-DIA-ALB-TST2", 4 , 6 , 1 , 0 , 100 , "AlimGanil") drvModbusAsynConfigure("LB-DIA-ALB-TST2:Write_6_1", "LB-DIA-ALB-TST2", 16, 6, 1, 0, 1, "AlimGanil") We made a network capture and when the problem occur, though this value is in the Write Waveform (I have checked this with the dbgf command), It has never been sent on the network. The TCP channel has never been broken. It seems that : The processing of the waveform has been interrupted but has not resumed, Or the write request has been ignored by the Modbus driver Or the write request has been ignored by the Asyn driver There is no error message issued by the IOC. Any Idea ? begin:vcard fn:Christophe Haquin n:Haquin;Christophe email;internet:[email protected] tel;work:02 31 45 46 61 x-mozilla-html:FALSE version:2.1 end:vcard
| ||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |