GeneRF v1808.29 - ANumSofts

Script sample . ... 'F' icon represents a Frame description and 'S' icon represents a Script description. A selected frame or a script ... N mode can be used to specify Mark or Space symbols in Manchester or Biphase-S coding (time violation).
319KB taille 14 téléchargements 228 vues
GeneRF v1808.29 ___________________

1. Presentation ................................................................................................... 2 2. Using ............................................................................................................. 2 3. Frames and Scripts list ..................................................................................... 2 4. Frame parameters ........................................................................................... 2 Name ............................................................................................................... 2 Content ............................................................................................................ 2 Bit duration ....................................................................................................... 3 Settle time ........................................................................................................ 3 Modulation type ................................................................................................. 3 Parasites ........................................................................................................... 3 5. Program parameters ........................................................................................ 3 6. Script parameters............................................................................................ 5 Name ............................................................................................................... 5 Syntax .............................................................................................................. 5 Allowed functions ............................................................................................... 6 7. Test ............................................................................................................... 7 8. Script sample.................................................................................................. 7

1. Presentation GeneRF program allows drive a PLL to send RF frames. With this program, it is possible to : - send predefined frames ASK and FSK - run scripts with frames sendings, loops, delays.

2. Using Before, you must define the COM number (Menu Program / Hardware settings). Set a connection to ANum module (Menu Program / Hardware settings). The ANum module Led must light on. Select a frame or a script and then send it with "Send" button.

3. Frames and Scripts list This list shows all defined frames and scripts. When you click one, parameters are displayed just below. 'F' icon represents a Frame description and 'S' icon represents a Script description. A selected frame or a script can be copied, deleted, modified or sent (for a frame) or executed (for a script). You can create a new frame or a new script, but parameters will be empty by default.

4. Frame parameters When you click on a Frame or a Script in the Frames and Script list, the Frame Parameters window is displayed with the parameters.

Name It's the frame name. This name will be displayed in the list. All characters are authorized.

Content It's the frame description. Syntax : Mode Nbits ( Value ) Mode Nbits ( Value ) Mode Nbits ( Value ) …

Mode is designed by a letter : M = Manchester (Manchester symbol '0' is coded with 2 bits "10" , whereas Manchester symbol '1' is coded "01") I = Inverted Manchester (Manchester symbol '0' is coded with 2 bits "01" , whereas Manchester symbol '1' is coded "10") R = Repetition (repetition of Value) N = Normal (binary) S = Biphase-S (symbol '0' is coded "01" or "10", symbol '1' is coded "00" or "11", edge for each symbol) P = PWM (symbols '0' and '1' are coded as defined in Parameters Configuration window) Nbits indicates number of bits to represent Value. Value can be written : - in decimal with 'd' at the end (ex: 172d) - in hexadecimal with 'h' at the end (ex: A2h) - in binary with 'b' at the end (ex: 10101100b) Ex: N12(A2h) M3(101b) N12(A2h) M3(000101b) R500(10b) N3(111b) S6(2Ch) P2(10b)

represents represents represents represents represents represents

12 bits : "000010100010" 3 Manchester bits : "011001" 18 bits : "000010100010011001" 1000 bits : "10101010..1010" 15 bits : "111001011001010" 6 bits : "110100"

Important : - in Repetition mode, Value must be always in binary - in other modes as Repetition, Nbits is limited to 32 bits - N mode can be used to specify Mark or Space symbols in Manchester or Biphase-S coding (time violation).

Bit duration This field defines the bit duration (20.0μs..680.8μs with a resolution of 200ns) Important : The bit duration is the time to send one normal bit. When you want to send Manchester bits, you need 2 bits for 1 Manchester bit, and then the baudrate is divised by two. For example, if the bit duration is 128.0μs, the NRZ baudrate is 7812bds and Manchester baudrate is 3905bds.

Settle time This feld represents the time between PLL wake up and first bit to transmit (see Fig2 on schematic). (0.0ms .. 60.0 ms with a resolution of 0.1ms).

Modulation type ASK of FSK (see Fig2 and Fig3 on schematic).

Parasites Parasites can be added to data, to simulate bad transmission or bad reception. See schematic for more details. Bounce: bounce on every edge of data (10.0μs .. 99.4μs with a resolution of 600ns). Jitter: add a jitter of +/- value (10μs .. 99 μs with a resolution of 1μs) Glitch: generate a glitch on a precise bit, with a precise duration (1.0μs .. 154.0μs with a resolution of 600ns).

5. Program parameters

Some parameters can be defined for all the frames. With them, you can modify the content of a frame without edit it. Click to "Configuration.." button, define up to 3 fields with the corresponding parameters. Ex: Name : Pressure Unit : PSI Coef : 2.0 Offset : 2.2

Now, in the Content field of a frame, instead write a value P8(5Ah), write the parameter P8(Pressure@). Every time you click on "Send" button, or when the frame must be send in a script, the frame content is evaluated again. In the Parameters Configuration window, you can attribuate the values for PWM coding. The CRC field name is always defined, you can't modify the name. If the content of a frame contains CRC@, the result of the CRC computation will be used. Ex:

Content of the frame : [ N8(A0h) N8(55h) N8(0Ah) ] N8(CRC@) Before the frame is sent, the CRC is computed for the values between '[' and ']'. In the Parameters Configuration window, you can choose the CRC method: 1- XOR 2- Byte wise SUM 3- Schrader 4- CRC For CRC method, you can define: - Polynomial value - Initialization value - XOR output value - Size 8 bits or 16 bits - Algorithm CRC-a or CRC-b A simulation window allows to test the chosen method with a specific frame content. Ex: CRC Simulation frame content: A0 55 0A Polynomial: 29 Initialization: 170 XOR output: 0 Size: 8 bits Algorithm: CRC-a Result:

Important : these CRC parameters are common to all described frames and script of the current configuration file.

6. Script parameters Name It's the script name. This name will be displayed in the list. All characters are authorized.

Syntax A script is composed of keywords. All keywords must be separated by a character ' ' or ',' or ')' or '('

Labels Labels are used to specify a location in the script for jump. Every label must have ':' character at the end. Ex: Loop: ..

If (V0 = 10) Goto Loop:

Variables It is possible to use up to 256 variables named "V0" to "V255". These variables can be named for more readability (See Defines).

Defines Defines allow to associate a name to a variable or a constant. Ex: #define Counter V0 #define Increment 1

Comments Comments begin with a ';' character. Ex: ; Comment Delayms(100) ; Comment

Allowed functions Legend: C = Constant S = String with " " delimiters V = Variable (V0..V255) L = Label

Delayms(C) Script is stopped during C ms Ex: Delayms(100) ; to wait 100ms Important : - this delay is not precise ~10ms

Send(S) Send a frame. You can use list box to select a defined frame for more facilities. Ex: Send("Trame 1bis") Important : - before the frame is executed, datas are transmitted to ANum module (4..10ms). It's important when many frames are sent one after another.

V=C Variable V will content C Ex: V0 = 10

V = V + C and

V=V-C

Calculation on variables Ex: V0 = V1 + 2 V0 = V0 - 1

If (V cond C) Goto L Tests on variables. If condition is true, go to specified label. Possible conditions are : "=", "", ">", "=", "