Dosimetry monitoring system

In March 2013, I performed an interesting work on the creation of a monitoring and control system for the ionizing irradiator.

The main interesting points of this software are:

    1. Integration into the system with the Premium controller (Schneider Electric) of the Belarusian system of dosimetry control of the Atomtech company SARKtech according to the non-standard protocol
Output current information from the system to the LED panels MIGRA

The scheme for setting up the integration of the Atomtech dosimetry monitoring system with SARKtech Premium was the following … First, all were assembled in accordance with the factory schemes and forced to operate the system as it was delivered from the plant. Then, disconnecting the connection between the panel and the most assembled system, we began to sniff the protocol of exchange and observe which telegrams the computer program sends to the panel (requests), and which the panel (answers) itself sends. The description of the protocol was, but it did not have much value, since something in it did not correspond to the current state of affairs.




As a result, a radionuclide emitter-tester was brought in and began to conduct tests, introducing each of the devices one after another into the “scale”.As a result, a radionuclide emitter-tester was brought in and began to conduct tests, introducing each of the devices one after another into the “scale”.


Code С+, works without errors (simulare panel):
//собирает float из трех байт
float R3toR4(BYTE a, BYTE b, BYTE c)
   float ret;
   void* pv = &ret;
   WORD e;
   BYTE s = a & 0x80;
   if((a|b|c)==0)return (float)0.0;
   a &= 0x7F;
   e = (WORD)( a + (BYTE)0x3e)<<7;
   ((BYTE*)pv)[3] = (HIBYTE(e)) | s;
   s = (b & 0x7f) | LOBYTE(e);
   ((BYTE*)pv)[2] = s;
   ((BYTE*)pv)[1] = c;
   ((BYTE*)pv)[0] = 0;
   return ret;
C-code works perfectly, but in Unity Pro XL (ST) it did not matter.
Test examples:

Input: 18317 14080  / 478D 3700
C-Value: 70.607422 / 428D3700
U-Value: 91.78

Input: 18137 20480  / 46D9 5000
C-Value: 54.328125 / 42595000
U-Value: 52.21

Input: 18137 5376  / 46D9 1500
C-Value: 54.270508 / 42591500
U-Value: 37.46

Input: 18136 62976  / 46D8 F600
C-Value: 54.240234 / 4258F600
U-Value: 123.4219

The code that works correctly in the Premium controller (Schneider Electric):
tmp_WORD   := INT_TO_WORD((BYTE_TO_INT(a AND 16#7F)+62)*128);
(* Allocated the order, shifted to the standard, shift to the left by 7 bits – in low byte remains low bit order *)
tmp_BYTE  := WORD_TO_BYTE(SHR(IN :=tmp_WORD, N := 8)) OR (a AND 16#80);
(* Order bit is returned by the character bit*)
tmp_BYTE1 := (b AND 16#7F) OR WORD_TO_BYTE(tmp_WORD AND 16#FF); (* High byte of mantissa *)
(* In the high byte of the mantissa, in which the most significant bit was discarded (in the IEE standard, it is always an unprotected one) *)
(* The lowest order bit is entered *)
First_WORD:= BYTE_AS_WORD (HIGH := tmp_BYTE, LOW := tmp_BYTE1);
Second_WORD:= BYTE_AS_WORD (HIGH := c, LOW := 0);
If (a=0) And (b=0) And (c=0) Then
  ret1 := 0.0;
  ret1 := WORD_AS_REAL (HIGH := First_WORD, LOW := Second_WORD);

With the panels (there were several), too, had to tinker, choosing initially wrong way of development of the situation. I began to torment the panel by character output of ASCII codes. Yes, as it turned out, you can also output this, but the correct way is to prepare ready-made message templates in the program of the panel and output them using the command code from the controller, like the program for working with the printer (sequence).



Цветные надписи

Colored types

#Integration, #third-party, #protocol, #Schneider, #Electric, #digital, #panel, #SARK, #dosimeter

Be the first to comment

You comment add

Back to the list