LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus

How can I test the connection through Labview?

How do I read/write to the device through Labview?

0 Kudos
Message 11 of 21
(1,385 Views)

Hi wakho,

 

How can I test the connection through Labview?

Send a command and read the device answer. When there is a (correct) answer the communication works…

 

How do I read/write to the device through Labview?

NI ModBus library comes with example VIs. Start using the "Serial Master" example - and read the device manual to know about the allowed commands…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 21
(1,379 Views)

GerdW wrote:

How can I test the connection through Labview?

Send a command and read the device answer. When there is a (correct) answer the communication works…

 

How do I send a command and read the device answer? (forgive me I am new to both labview and modbus).

0 Kudos
Message 13 of 21
(1,374 Views)

Why are you using the NI Distributed System Manager?  Are you reading your instrument across a network?  If not, please just use NI-MAX so there's no confusion about what info you're getting.  If you don't know MAX check the tutorials here:  http://www.ni.com/tutorial/5439/en/   It's a great tool to troubleshoot these kinds of problems.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 14 of 21
(1,352 Views)

Hi wakho,

 

see the example VIs that come with the NI Modbus installation…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 21
(1,365 Views)

Thank you, your comment was very helpful. So now I can write to the device, no problem. But when i read or query I get this timeout error... How can I resolve this issue?E1.PNG

0 Kudos
Message 16 of 21
(1,350 Views)

Why are you sending an *IDN? command to a modbus device?  That command does not exist in the modbus protocol?

0 Kudos
Message 17 of 21
(1,350 Views)

Hi wakho,

 

I really love it when people stick with their threads instead of starting multiple parallel discussions (for the same topic)!

(Yes, sarcasm…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 18 of 21
(1,338 Views)

@GerdW wrote:

I really love it when people stick with their threads instead of starting multiple parallel discussions (for the same topic)!

(Yes, sarcasm…)


Or send you PM's asking you how their hardware works.

 

Did you use the simple serial example I mentioned?  Did you look at the modbus code I mentioned?  Did you take the free training I linked to?  Did you read the hardware manual for the device you are using?

0 Kudos
Message 19 of 21
(1,322 Views)
0 Kudos
Message 20 of 21
(1,317 Views)