Jump to content

SvjatoslavsKrasnikovs

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by SvjatoslavsKrasnikovs

  1. Thank You so much for trying to help me. I've sketched a rough connection schematic, according to what You've suggested. Is it right ?

    On the JZ20-PRG to JZ10-22-CS10 side, the connection is standard (through MJ20-CB200 cable). However, after the DB9 of MJ10-22-CS10 I'm braking the connector (DB9) into individual cables (on a breadboard). The +24V will be used from the PSU (I'll use bench PSU , with GND connected). 

    IMG_20170727_103744.jpg

  2. Hi, I'm running an Arduino-based home automation system. My custom-made Arduino clones are communicating over a RS485 network (configured as 8N1) using Modbus RTU protocol. Thing is that I want to have a reliable,  industrial-grade PLC in the network, in order to monitor my Arduino-based sub modules. Basically I need a cost efficient Unitronics PLC capable of connecting to RS485 network, The ladder program is expected to be non memory hungry, also I'm fine with good old 2 line display. The PLC must be able to connect to the RS485 network without the use of any extension modules/communication modules /.etc (native COM port on a screw terminal). 

    Any suggestions?

    Thank You.

  3. Thank You for the reply. Well, I do not have an access to MJ20-RS module at the moment. All I have is MJ20-PRG, MJ20-CB200 and MJ10-22-CS10.

    If I'll power up pins 1 and 6 of a MJ20-PRG through MJ10-22-CS10 (just like in a picture attached) will I be able to use my MJ20-PRG as a RS232 module ? Or do I need to change the schematic in any way (attach series resistor to +5V line, etc.) ?

    Thank You

     

     

    IMG_20170719_165938 (1).jpg

  4.  

    Hi. I have a Unitronics JZ20-R16 (Jazz2) controller I’ve programmed to run a simple air ventilation system in my house (The thing is running great btw.). I also have a self made Arduino based data logger (I use it to monitor and log my energy consumption, temperature, etc.) I’m not building those things or mass producing, Arduino electronics is my hobby - I just use it to stay sharp.

     

    So I decided to cross-integrate my air vent. Controller with my data logging unit (I want to see the status of my air vent. Controller unit on Arduino). So for starters the task is to simply send a 16bit int to Arduino and receive another 16bit int from the Arduino.

     

    The communication protocol of the choice was MODBUS through RS232 interface (as I already have MJ20-PRG; MJ20-CB200 and a MJ10-22-CS10). I’ve decided to use JZ20-R16 as a Master (Arduino as a Slave) in a 9600 baud 8N1 configuration (default for JZ20-R16). For Arduino’s RS232 interface I’ve used TTL-RS232 converter (MAX3232 based) :

    t6NhpTTctm6qdH_WrvF2zlJCRbwVPDSTg4nyyz6FAd1AbHubgJLQmXGtuX7dAfycWHi9w6l-diJt-tahqyxoghL5G3jsOyuLo2fu31eNAoTLzUQClAPW8VG1OpsOOjUp7qtdOw38vnzeOIRn48ACVcILzJYbR0uTTFv1XEPoKj-zet25eP3_bH8wC2uIQoaNnabOq1Wp_XRbC5mfBUUHhSLla3nBEgca3bP2RDsjqd3cBHH0E64XJ5a9zHHQ_wLPu2SqzmAkkRvXFlh0

    Experiment 1:

    In order to see if the Arduino’s MODBUS feature is working I’ve connected Arduino to my PC using the given connector and a RS232-USB converter. Arduino was configured as a slave and ModbusPoll software (http://www.modbustools.com/modbus_poll.html) simulated a master. I was able to both read a holding register from Arduino (03) and also write a register (06). Those are the desired options.


     

    Experiment 2:

    In order to see how MODBUS is working on JZ20-R16 I’ve hooked it up to my PC using my MJ20-PRG; MJ20-CB200 and a MJ10-22-CS10 later connected to RS232-USB converter. I’ve uploaded a program (by pressing buttons 1 and 4 I send an int or correspondingly request an int from slave):

    (see in uploaded files)

    It make the JZ20-R16 work as a Modbus master on a RS232 interface. In order to simulate a slave I’ve used ModbusSlave software (http://www.modbustools.com/modbus_slave.html) . Once again, the combination worked perfectly. Once again all the required commands worked.

     

    Here’s the photo of my hookup:

    EuVUNLGyouHYuc8vNwtj1YGtuay0IXoEpgbpB2CKzid-93-MVMByfFMuEUiYKVpWtqzw1od-jZ4eSnT-pR3TTppzH2szkIFEfo1qO12lUJvnQIcHUPSYV_c8genzSVJrtHeLQn88

    Then I’ve noticed a possible cause for future problems : lines 4 and 7 of my MJ10-22-CS10 are actually used in this communication. It turned out that the RS232 communication with JZ20-R16 require 6 wire communication instead of 3 wire communication I’ve expected from RS232 interface. Due to the requirement of RTS and DTR signals!

     

    I’ve turned on my scope and actually saw those signals on pins 4 and 7 of MJ10-22-CS10 connector going high after the “handshaking” with my slave simulator was done.

    With PC USB disconnected:

    -qx-3p2TOx9D9S5QZroYhUsQke1tVT9_kk0bYIR2V5qpOlsBOE8xciDKXLeHa8Miu6Gj7Eg7aeo98FsMMhhK89lfe5Pyme6ZRly1dhKiTEhIr5ViwrDFh0kBrvWfxQrXazm5fp2f

    PC USB Connected:

    7DhrNBf6Cifd7T9MHA7e_CfZK9sOS12U1wSHLc8PREu4HP81b5kkk3tvI59VftmrCbodrxwf4kBT442C7NUMvfCykC3LlONAsoAaUfWMXPTNYtm8n7pnKHm8hPEigC6hnM1ig5TV

    MudbusSlave  after “handshaking”:

    q4qgimB6E85k1e5l3esdE3rR7GeHLn5DCCLGp9yqcRWhui0JjSyI_zRYhWnAqGUtP1r0yA8glzCIqrJfaNzbUVAtVob7zCXgudtB43c0FWkHBK3VycA9rImIjL-EbZL50Z1rqX7T

    Successful communication:

    483LWepHAcc7PbfVatoCXlM9xjQ4p_HKi6HfUPTEvcjYYJWOwmcKriW_0iTXRloknOx-zpIzpvhJlFP-FBX1x-FmFqQFxHflnyP0I_Q2szW_VrJTAxvr4rUgvYsmho7vVXkISX95

    CH3/4 are the DTR and DTS signals correspondingly. At this point I’ve realizes that sue to those signals I would not be able to connect my Unitronics to my Arduino, as the TTL-RS232 connector simply do not support DTR and DTS signals. So after hooking up my Arduino to Unitronics I see the following on the scope:

    6L7BW1-zVpc5ibVxoEZDPThgBzdXrl8TPZHAugjBGTYzer0TZiqtoXEph7MVgu46v2IrDZAkQXQh-UCYSbFL1aTo62vPPDCQkdZhY6MhYqdAyfhbb4NZHXIBoJE482-1cUibJb2W

    Both DTR and DTS signals are on 0 instead of HIGH, which prevents the JZ20-R16 from accessing the modbus.

     

    The questions:

    1. Is there any chance to make JZ20-R16 communicate over RS232 without use of DTR/DTS signals?

    2. Is there an option to tweak those signals (connecting them to +5V permanently)

    3. Use of other TTL-RS232 converter?

    4. Any other way to make Arduino and JZ20-R16 communicate over RS232 interface using MODBUS

     

    Thank you for the patience.

    samplemodbusmaster232.U90

  5. Hi,

    I am facing troubles while trying to log and later display time using Jazz2 controller. So, I'm trying to make an error log. When the error occurs I store current content of SI31 (RTC time) to MI (MI33 in this case - so far it's working). Then in order to display the error I pass MI33 content to MI41 (MI41 is linked to Time Function variable (in CT format) that is then displayed on HMI) . You can see the whole process in images below. The problem is that in the end, the content of MI41 (decimal 1500 - which I corresponds to 15:00 time) is then displayed as 05:DC on the HMI display. I guess the problem is caused due to DEC/HEX conversion. Any idea how to fix this ? Thank You.

     

     

    1st.png

    2nd.png

    3rd.png

    4th.png

×
×
  • Create New...