Jump to content
Фарах

serial communication

Recommended Posts

Hi!

I am working on interface that contains of master(pc) and 2 slaves (microcontroller) and i want to send data from 2 slaves to master via serial communication

it is possible to implement this architecture in labview? and how?

thnx

Share this post


Link to post
Share on other sites

What type of serial communication are you using? RS232, RS485, RS422, I2C, SPI, ETC?

The type you are using will determine whether it's physically possible to have multiple masters/slaves on the same connection.

If you're using a compatible serial connection, yes... LabVIEW can do what you're asking.

As far as how... there are already lots of examples built into LabVIEW and on the internet.

  • Like 1

Share this post


Link to post
Share on other sites

thanks for reply

i will use rs-485 .. i searched a lot in the internet but didn't find what i wan't

can you tell me please .. i will use 2 read function for each slave or 1 is enough?

Share this post


Link to post
Share on other sites

You will likely need a write (to request the data) and a read (to get the data) for each slave.

  • Like 1

Share this post


Link to post
Share on other sites

thnx crossrulz

but how to connect each read function ? by flat sequences loop or how? and it is necessary to insert an interval between these read functions?

 

 

Share this post


Link to post
Share on other sites

What is your topology? Is it a single RS485 link per slave, or are they on the same bus? If they are on the same bus, you will have to think of the communication protocol, is it token based, is it CSMA/CD? That is up to you, as the designer.

  • Thanks 1

Share this post


Link to post
Share on other sites

Daisy-chained / multi-dropped RS485 with a master-slave protocol? If you need an example of how that can be done in LabVIEW you can look at this one which is based on one of the industry-standard protocols for such communication - Modbus :
 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.