Home AMX User Forum AMX General Discussion

Ctg-lon Comm-tec

Good afternoon!
Help to understand with CTG-LON COMM-TEC. I can not understand as to adhere number of a array of a variable to number RS232 of port, in case of if it is some devices.
Thanks.
From Russia with love.



DEFINE_VARIABLE
// Arrays f?r R?ckmeldungen
FLOAT fLON_SWITCH_RM[10][64][2] // 10 Gateways a 64 SWITCHer mit 2 Werten
INTEGER nLON_STATE_RM[10][16][16] // 10 Gateways a 16 STATEs mit 16 Werten
FLOAT fLON_SETTING_RM[10][64][3] // 10 Gateways a 64 SETTINGs mit 3 Werten
FLOAT fLON_TEMPP_RM[10][32][1] // 10 Gateways a 32 TEMPPs mit 1 Wert
INTEGER nLON_PRESET_RM[10][32][11] // 10 Gateways a 32 SETTINGs mit 11 Werten
INTEGER nLON_COUNT_RM[10][32][1] // 10 Gateways a 32 COUNTs mit 1 Wert
INTEGER nLON_TIMESTAMP_RM[10][1][6] // 10 Gateways a 1 TIMESTAMP mit 6 Werten
INTEGER nLON_SCENE_RM[10][32][2] // 10 Gateways a 32 SCENEs mit 2 Werten
VOLATILE INTEGER nGW_PROTOKOLL = 0 // 1=RS232, Anderer Wert = RS485

Comments

  • AMB wrote:
    Good afternoon!
    Help to understand with CTG-LON COMM-TEC. I can not understand as to adhere number of a array of a variable to number RS232 of port, in case of if it is some devices.
    Thanks.
    From Russia with love.



    DEFINE_VARIABLE
    // Arrays f?r R?ckmeldungen
    FLOAT fLON_SWITCH_RM[10][64][2] // 10 Gateways a 64 SWITCHer mit 2 Werten
    INTEGER nLON_STATE_RM[10][16][16] // 10 Gateways a 16 STATEs mit 16 Werten
    FLOAT fLON_SETTING_RM[10][64][3] // 10 Gateways a 64 SETTINGs mit 3 Werten
    FLOAT fLON_TEMPP_RM[10][32][1] // 10 Gateways a 32 TEMPPs mit 1 Wert
    INTEGER nLON_PRESET_RM[10][32][11] // 10 Gateways a 32 SETTINGs mit 11 Werten
    INTEGER nLON_COUNT_RM[10][32][1] // 10 Gateways a 32 COUNTs mit 1 Wert
    INTEGER nLON_TIMESTAMP_RM[10][1][6] // 10 Gateways a 1 TIMESTAMP mit 6 Werten
    INTEGER nLON_SCENE_RM[10][32][2] // 10 Gateways a 32 SCENEs mit 2 Werten
    VOLATILE INTEGER nGW_PROTOKOLL = 0 // 1=RS232, Anderer Wert = RS485

    The nGW_PROTOKOLL variable will tell the Software Module to use either RS232 or RS485 handling on the control port of a NI / NXI / NXC-COM2. This is some kind of "leftover" from a very first small series of gateways which had a RS232 control port. The current gateways have RS485, so this flag must be set to 0.

    The 3-dimensional arrays are for storing feedbacks, i.e.
    FLOAT fLON_SWITCH_RM[<gateway 1..10>][<LON Switch feedback elements>][<feedback has 2 values>]

    The current gateways are always adress 1.
    In case of SWITCH feedbacks we can have upto 64 feedbacks
    Every SWITCH feedbacks has 2 values, VALUE and STATE (like in LON environment)

    Let's say we want to have a button set on the panel, if SWITCH feedback #33 hase a state of 1:
    [dvPANEL,1] = fLON_SWITCH_RM[1][33][2]

    If you need any assistance, feel free to contact me directly:
    mscheibein@comm-tec.de
  • Hi, i have a problem communicating with CTG-LON module. I get response, but i cannot control the devices and the returned status is not correct, for example, querying for SWITCH will always return 0. The LON programmer has already configured the gateway, but maybe there is some address problem? I'm reporting some data to help debug:
    Command: LISTGW
    Answer:
    LON GATEWAYS PRESENT:$0D$0A
    RS485 Address 0 -> Neuron-ID 000000$0D$0A
    RS485 Address 1 -> Neuron-ID $0D$0A
    RS485 Address 2 -> Neuron-ID $0D$0A
    RS485 Address 3 -> Neuron-ID $0D$0A
    RS485 Address 4 -> Neuron-ID $0D$0A
    RS485 Address 5 -> Neuron-ID $0D$0A
    RS485 Address 6 -> Neuron-ID $0D$0A
    RS485 Address 7 -> Neuron-ID $0D$0A
    RS485 Address 8 -> Neuron-ID $0D$0A
    RS485 Address 9 -> Neuron-ID $0D$0A

    Command (query for device 2 switch status): SWITCH?1:2
    Answer activating debug (always, even if the device is ON):
    NV-BUFFER: $FE0i1:0/0o$FF$0D$0A
    String from vdvLON: SWITCH=1:2:0.0 :0$0D$0A

    Anyone can help? Thank you
  • ppdkppdk Posts: 31
    How many LON devices do you control with the CTG-LON? Is it a point to point connection (one cable from the CTG-LON to the other LON device)? Do you try to query the LON device after a reboot of that device?

    Keep in mind that LON is not similar to other bus networks. In general you will be able to read a variable's value
    ONLY if that value has changed in the LON network!
Sign In or Register to comment.