REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. HW/SW integration
    3. Communication (RS232, RS485, I2C, SPI, UDP, TCP, ...)
    Log in to post
    Load new posts
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • C

      SPI communication in REXLANG

      • • contactform
      4
      0
      Votes
      4
      Posts
      1.6k
      Views

      jaroslav_sobotaJ

      Hi,

      In this case you just use spi_bufTx[0] = 0;

      If you wanted e.g. SPI_MODE = 2 and LSBFIRST, you would use

      spi_bufTx[0] = 2 | 8;

      In other words, the first 2 bits define mode, the 3rd bit defines CS behavior, the 4th defines LSB etc.

      CS signal is controlled by operating system. You can only change its behavior by the 3rd bit as mentioned above.

      As for the delay function, I have turned it into a separate topic.

      Best regards,
      Jaroslav

    • C

      Interfacing SX1509 pin expander

      • • contactform
      2
      0
      Votes
      2
      Posts
      1.1k
      Views

      cechuratC

      Hi Chris,

      thank you for reaching out.

      Yes, it is possible to interface with SX1509 via I2C using REXYGEN. However, it will require a bit of hand-coding.

      Have a look at function block called REXLANG and its function "OpenI2C" - https://www.rexygen.com/doc/PDF/ENGLISH/BRef_ENG.pdf#page=439

      There are also some examples on I2C communication available - "0502 Generic I2C Communication" folder in Examples library (which is part of REXYGEN Studio) - these might help you to see how to implement the I2C communication according to your needs.

      Let us know about your progress.

      Regards, Tomas

    • S

      Ethercat compatible?

      • • Scoobsalamander
      13
      0
      Votes
      13
      Posts
      3.3k
      Views

      S

      No problem, it is only for some hobby-related stuff so no rush.

      Grtz,

      Kris

    • H

      Telegraf (influxDB) integration

      • • hubert
      3
      0
      Votes
      3
      Posts
      1.2k
      Views

      H

      Hi @Scoobsalamander, thanks for info, I will look into it.

      Hubert

    • S

      Connecting Racing Wheel to REXYGEN

      • • stepan.ozana
      5
      0
      Votes
      5
      Posts
      1.5k
      Views

      jaroslav_sobotaJ

      Thanks for the explanation, now I understand. Nice solution.

      Jaroslav

    • S

      Best way to send commands over Ethernet to a 2Dcode (QRcode) reader

      • • sadilekivan
      2
      0
      Votes
      2
      Posts
      364
      Views

      cechuratC

      Hi Ivan,

      thank you for your question.
      Using REXLANG function block you can manage Ethernet communication - see REXLANG documentation - part Communication functions: https://www.rexygen.com/doc/PDF/ENGLISH/BRef_ENG.pdf#page=447

      Have a look also at "0504-01 Generic UDP Sender Receiver" example which can help you to start with the implementation.

      Regards, Tomas

    • B

      SPI Communication / Rexlang / RelayPlate / DAQCPlate

      • • Butcher
      3
      0
      Votes
      3
      Posts
      465
      Views

      cechuratC

      Hi Paul,

      thanks for reaching out. You can now integrate Python scripts within REXYGEN 2.50.10 - for upgrade see post https://forum.rexygen.com/topic/120/installation-of-rexygen-2-50-10-testing

      Python block documentaton: https://www.rexygen.com/doc/ENGLISH/MANUALS/BRef/PYTHON.html#x272-27100016

      Let us know if it helped.

      Regards,
      Tomas

    • S

      I2C with REXDuino

      • • stepan.ozana
      2
      0
      Votes
      2
      Posts
      409
      Views

      S

      Me and my colleague finally implemented some functional solution. We make it public if anyone is interested. Many thanks to Ing. Tomáš Dočekal!
      MCP4725_REXDuino_2_50_10.zip

    • B

      Solved Can driver

      • • Bentoni
      9
      0
      Votes
      9
      Posts
      923
      Views

      R

      Hi Toni,
      FilterIdMask can be used for filtering messages from more devices. In your case, there is only one device, so you can set FilterIdMask as 0xfff. For message decomposing, use the INTSM blocks (www.rexygen.com/doc/ENGLISH/MANUALS/BRef/INTSM.html). The basic example of using INTSM block can be found in this thread: https://forum.rexygen.com/topic/174/reading-and-writing-4-byte-floating-point-from-modbus?_=1609251284153
      For decomposing a byte value into bits can be used block BDOCT(www.rexygen.com/doc/ENGLISH/MANUALS/BRef/BDOCT.html).

      Cheers,
      Jan

    • B

      Solved I2C EZO component

      • • belgacom
      20
      0
      Votes
      20
      Posts
      2.1k
      Views

      R

      @belgacom You are welcome 🙂

    • S

      This topic is deleted!

      • • sabinadipu53
      1
      0
      Votes
      1
      Posts
      14
      Views

      No one has replied

    • P

      eBUS

      • • pancirm
      2
      0
      Votes
      2
      Posts
      607
      Views

      J

      @pancirm
      Hello Michal,
      as far as we know, no one implemented the eBUS in REXYGEN. However, implementation should be possible, for example, via eBUS <-> USB converter and REXLANG or Python programming block.

      Cheers,
      Jan

    • M

      VSD single wire Modbus

      • • MikeyH
      1
      0
      Votes
      1
      Posts
      335
      Views

      No one has replied

    • K

      This topic is deleted!

      • • kimtrong0147
      1
      0
      Votes
      1
      Posts
      5
      Views

      No one has replied

    • N

      This topic is deleted!

      • • NikalJohnson
      1
      0
      Votes
      1
      Posts
      2
      Views

      No one has replied

    • H

      REXduino and TSC2007

      • • hrabalo
      4
      1
      Votes
      4
      Posts
      536
      Views

      cechuratC

      @hrabalo Hi,

      Thanks for getting back to us. I'm glad it works for you now.

      Good luck with your project.

      Cheers, Tomas

    • C

      Communication with USBRLY82

      serial rexlang • • contactform
      2
      0
      Votes
      2
      Posts
      376
      Views

      cechuratC

      Hi George,

      Thanks for your question. You need to create a kind of state machine which basically does the following (one line = one task period):

      Write() - send a read request to the device Read() - save received data and length into a global buffer/variable and distinguish if the received message is complete Retry and repeat Read() if the previously received message was not complete

      You will need to introduce a timeout - it can happen that you lost some data so there should be some timeout when you say "Message incomplete, resend the read request".

      Cheers,
      Tomas

    • G

      ASCII Commands Over RS485

      • • GeorgeDumitru
      19
      1
      Votes
      19
      Posts
      1.7k
      Views

      J

      @georgedumitru I think the best documentation is this thread here on the forum. Byte array reading from communication is also discussed there.

      Another helpful tool is definitely the example located at C:\Program Files\REX Controls\REXYGEN 2.50.12.14711\Examples\0203_Function_Blocks_REXLANG.

    • S

      HW PWM on RPi?

      • • stepan.ozana
      2
      1
      Votes
      2
      Posts
      270
      Views

      J

      @stepan-ozana Hello, yes PWM flags should work as HW PWM on GPIO12, GPIO13, GPIO18, GPIO19 pins. The functionality should be the same as described here: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
      https://www.electronicwings.com/raspberry-pi/raspberry-pi-pwm-generation-using-python-and-c

      Best regards,
      Jan

    • B

      Raspbiian Bookworm

      • • BailP
      2
      0
      Votes
      2
      Posts
      252
      Views

      J

      @BailP Hello,
      yes, there are REXYGEN packages (version 3) for Bookworm. Details are described here.

      Cheers,
      Jan

    This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

    There is also an outdated REXYGEN community forum.

    Powered by NodeBB.