05-02-2018 07:49 AM
Hi, thanks for replies. I have 4 furnace and 1 USB/RS 485 signal converter adapter. I need to read just the data from those furnaces. Here the internet page control device of furnace and the manual . I will use four of them and need to communicate each of them separately with labview version of modbus which is exactly I showed above. Here the internet page of the signal converter that I used.
Sincerely.
05-02-2018 09:07 AM
You need to assign each of your controllers its own address by setting parameter 42 ("Addr", see page 18 of the manual) to a different value for each controller. Then use four Modbus read functions, one for each of the addresses you assigned. You can't perform the four reads in parallel since they all use the same RS-485 interface, so serialize them by stringing their error in/out lines together in a series. If you need more specific help than this, ask specific questions.
05-03-2018 02:16 AM
Hi Arteitle,
Thanks for replying. You mean like that?
Here I set the starting addresses as 1,2,3 and 4. I put those addresses to the Modbus read function as starting addresses. I think this is insufficient way?
Sincerely.
05-03-2018 05:40 AM
Hi,
Can you send the whole settings mentioned on page 18 of the protocol pdf. There's a difference between starting address and slave adress.
From your previous reply:
Starting address: 5,7,11
Slave address: 1,2,3,4
05-03-2018 09:53 AM - edited 05-03-2018 09:55 AM
As jay pointed out, the device address (more properly called the 'Unit ID") is different from the starting address (the location in the device's memory from which you want to read). The Unit ID is stored in the blue "serial master instance" wire that's wired to each of your Modbus Read functions, while the starting address is the integer that's wired to each Read. (Note, just like how you wired the error lines of the reads together in series, you should also wire the serial master instance lines between the reads in series too.) Your "New Serial Master" function has an ID of 1 wired to it, so all your subsequent reads and writes that use the serial master instance from it will talk to unit ID 1. If you want to also send queries to units 2, 3, and 4, you either need to create three more New Serial Masters with those IDs and then keep the four serial master instance wires from them separate, or perhaps easier, you can just create one Modbus Master as you have, but use the "Set Unit ID" function to change it before trying to talk to each device. You can work out how to use a For loop that repeats four times to read the same set of addresses from all four Unit IDs.
05-03-2018 02:41 PM - edited 05-03-2018 02:44 PM
@happinesss wrote:
Hi Arteitle,
Thanks for replying. You mean like that?
Here I set the starting addresses as 1,2,3 and 4. I put those addresses to the Modbus read function as starting addresses. I think this is insufficient way?
Sincerely.
No NO NO NO!
Like the attachment.
Don't forget to close the masters when done. Also, you need labels for your block diagram terminals like I show. You can hide the labels on the front panel if you want, but the BD should always have labels so the programmer knows what the purpose of the terminal is.
And don't use shift registers on the error wire. Not unless you do something to handle errors. Otherwise one random timeout error will cause your code to stop working until you stop and restart the VI.
05-03-2018 10:13 PM
Hi jay0909,
Thanks for reply. Here is the settings manuel. Yes, you are right. I saw your point and understand my wrong way. There is difference in starting address and Unit ID's which are slave ID's which I totally did it in a wrong way. As Arteitle's answer, I have easily seen my error. Again thanks. I will be more careful next time I hope 🙂 .
05-03-2018 10:27 PM
Hi Arteitle,
Thanks for reply. I understood what you say. Create 4 different Slave ID's, not put them in a starting address. I understood wron at first time, I thought you mean from address is that one but they are totally wrong. I have to create different IDs to communucate each slave and their whole starting address' are same. So, I can use for loop for 4 IDs or using Set Unit ID. Again, thanks a lot.
05-03-2018 10:37 PM
Hi RavensFan,
Thanks for reply. Sorry for weak explanations. I hope I will be more careful about the labels next time. I get your point about error. When I said insufficient, that program didn't work as expected. I can use 4 for loops as you did or I can use set unit ID in a loop as well. I understand and did the whole thing in a your way. So I think, I understand correctly. Again thanks for your efforts.
05-04-2018 02:39 AM
Hi,
Can you provide me the naming convention for the registers 5,9,11,17. Because in your first post i see 9 is a coil. So can please explain what are you trying to read and write.