LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rt with modbus serial


Hello dear Khalid!!!

Last time I told you that all work. But now I cannot fine the appropiete way to see the bytes of an adresse. It means, I want to see bit 0, 1, 2, etc. from a "Read Input Registers or Read Holding Registers" and I had try but without success. Do you have any idea, how I can to do that?

Have a nice day!!!

Yaridia

0 Kudos
Message 11 of 19
(2,544 Views)

Let's step back a bit.  What Modbus VIs are you using?  The ones from NI?  If so, what is the error message you get?  If not, what VIs are these? 

Also, what exactly are you trying to read from your Modbus devices?  What are the types of the items: holding registers?  coils?  inputs?  What are their addresses? 

Do the devices come with any communication software?  If yes, have you been able to communicate with the devices from this? 

Sorry for asking more questions than answering... 

-Khalid

0 Kudos
Message 12 of 19
(2,536 Views)

Khalid

I am using MB Query to read Input ( 30001 ) and Holding ( 42001 ) registers. And I am not getting an error message.

What I try to read are the bytes from a word, it means, for instance I have an address 42002, and I need to see the bit 0, 1, 2, … etc., but I can get only the first 8 bits. That with the MB Serial Master Query.vi, where I found the decode.vi.

Right now I am simulating a Slave with Modbus Slave – a software – and the Real Time is the Master. I can read and write without problem.

I am working with a RS-485/4 Serial PXI-8421. And it appears to me that ok. So, what can I do to see all bits?

In advance thanks for your help.

Have a nice day

Yaridia

0 Kudos
Message 13 of 19
(2,530 Views)
Hello All!!!

I ask me, if somebody know, where I can configure the refresh rate for modbus?

Have a nice day.

UserLab

0 Kudos
Message 14 of 19
(2,498 Views)
Hi,

I am sorry for the delayed response.

Regarding reading the individual bits, all you should have to do is to use the Number to Boolean Array function in LabVIEW. This will give you the individual bits for the Modbus register, which is a 16-bit register. You may also have to insert a Reverse Array function if the bits are in reverse order. Are you not seeing this? Please provide specific examples with numbers/data.

As for the refresh rate, it's up to the Slave to do this. What is the Slave device again? See for any settings therein for this. Since your VI is a Master, all you can do is change the rate at which you query the Slave. So, essentially changing how often you run the MB Serial Query VI.

Hope this helps.

-Khalid
0 Kudos
Message 15 of 19
(2,489 Views)

Hi Khalid!!!

Thanks, refer to the bits I solved that problem without toil. And it is working perfect. But could you betray me,  where  could I change the rate? All that I see is the timeout but nothing about a refresh rate. Our Slave is an own card, the they call FCM.

In advance thanks for your help and at the same time I wish you a nice day.

Yaridia.

0 Kudos
Message 16 of 19
(2,482 Views)

I am assuming you are running the Query VI in a loop.  If yes, then changing this loop's rate would force the Query VI to run faster, i.e., more number of times in a given period of time. 

Let me know if I am not clear enough. 

-Khalid

0 Kudos
Message 17 of 19
(2,478 Views)

Hi Khalid!!!

Sorry if I had not answerd so quickly, but all is o.k. I mean, all is working perfectly.

Thanks for your tips and have a nice day.

Yaridia

0 Kudos
Message 18 of 19
(2,450 Views)
Yes, all's well that ends well.

-Khalid
0 Kudos
Message 19 of 19
(2,447 Views)