NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Modbus API Discussion

Hi

I am using the modbus library 1.1.5.39, to communicate with a sensor using Modbus RTU over serial line. The problem is my VI works fine and the EXE works fine too, when run on a pc with LabVIEW installed on it (LV 2013). When I run the exe on a PC with no LabVIEW (lets call it pilot PC) installed, I get an error 56. I tried it as an installer also and included the NI runtime and NI Visa runtime, but still did not work.
Do we need any additional runtime libraries to use it as an EXE.

Thanks in anticipation

Regards

Suvansh

0 Kudos
Message 301 of 527
(969 Views)

No special runtime needed. Since this is a different computer are you sure the visa resource is the same as what's stored on the exe?

0 Kudos
Message 302 of 527
(969 Views)

Yep, it was a visa resource problem. All sorted now, works fine

Thanks.

0 Kudos
Message 303 of 527
(969 Views)

Hi Smithd, Hi everybody 

I've used this API successfully to create a RTU Master, IP Master or IP Master with a gateway, RTU over TCP... and my new goal is to add new Modbus functions.

I have to add functions that are not in the Modbus Master API master, for example 18, 21, 22... I know how to write the code for the function. But the problem is that the Master class is protected. So I can’t add to the API

How to do ?

Many thanks

Luc

banniere Luc Livre NXG Champion.png

Luc Desruelle | Mon profil | Mon blog LabVIEW | Auteur livre LabVIEW : Programmation et applications - G Web
Certified LabVIEW Architect (CLA) & Certified TestStand Developper (CTD) | LabVIEW Champion

MESULOG - LinkedIn site | NERYS - NERYS Group
| directeur CEO MESULOG
| CODIR - NERYS group

0 Kudos
Message 304 of 527
(969 Views)

You would want to create a child class of the "master api" class. This (inc an example) is described here:

https://decibel.ni.com/content/message/58374#58374

If have trouble the template I can send another example I made for someone communicating with a specific device.

0 Kudos
Message 305 of 527
(969 Views)

Hi,

I'm using this to control a modbus RTU device, it's been working fine for a while but has started giving error:

-1073807298

Property Node (arg 1) in SubVIs.lvlib:RTU Data Unit.lvclass:Read ADU Packet.vi:50300001 -> Modbus Master.lvclass:Write Single Holding Register.vi:24700001 -> Modbus Module.vi -> RT Top Level.vi

Any ideas on possible causes?

0 Kudos
Message 306 of 527
(969 Views)

Hi what I am doing is to make The MOBUS API working with ARM processor cortex M3,is it possible?

0 Kudos
Message 307 of 527
(969 Views)

paulmhl wrote:

Hi what I am doing is to make The MOBUS API working with ARM processor cortex M3,is it possible?

I'm not sure what you mean here. Do you want to communicate with an arm processor? Do you want to run labview and this library on the m3?

0 Kudos
Message 308 of 527
(969 Views)

ADLB-AC wrote:

Hi,

I'm using this to control a modbus RTU device, it's been working fine for a while but has started giving error:

-1073807298

Property Node (arg 1) in SubVIs.lvlib:RTU Data Unit.lvclass:Read ADU Packet.vi:50300001 -> Modbus Master.lvclass:Write Single Holding Register.vi:24700001 -> Modbus Module.vi -> RT Top Level.vi

Any ideas on possible causes?

There are some KBs on this error on our website but they don't make a ton of sense. This might be the situation if you have a usb to serial converter: http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Error-1073807298-on-VISA-write/td-p/193177

The only two property nodes I have in there are reading baud rate and reading bytes at port, neither of which should cause an issue related to the buffer.

When does this error start happening? Does it happen ever time now, or will it work for a few minutes and then fail?

0 Kudos
Message 309 of 527
(969 Views)

Thanks for the reply,what I am meaning is I want to run labview and MODBUS API on the M3.is it possible?

0 Kudos
Message 310 of 527
(968 Views)