ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus RTU - RS232

Hi all,

I'm working with CompactRIO 9045. This plc is equipped with the rs232 and the rs485. I need to communicate with two devices in Modbus RTU. 

I have no problems with RS485 communication. This is initialization VI:

 image.png

I do the same operation with rs232 port (ASRL1::INSTR):

image.png

But I have this error:

Error -1073807246 occurred at Property Node (arg 1) in SubVIs.lvlib:Serial Shared Components.lvlib:Configure Serial Port.vi->SubVIs.lvlib:Serial Master.lvclass:Initialize Master.vi->Modbus Master.lvclass:Initialize.vi->Modbus Master.lvclass:Create Master Instance (Serial).vi->readExdSh1.vi

Possible reason(s):

VISA: (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.

 

The resource can't be occupied...

I have seen all  national guides and tutorial, but I don't find the solution.

Can you help me?

 

Thank you.

0 Kudos
Message 1 of 6
(5,607 Views)

That error usually means some other program has the serial port open.  Once it in a while it might be an early instance of LabVIEW that opened it, but didn't close it cleanly.  In that case, closing LabVIEW and re-opening will solve the problem.

0 Kudos
Message 2 of 6
(5,573 Views)

Hi Revens,

I have dove it but I have problem again. I create a project with only VI and I have problem. 

I think that there is a default process that occupies the rs232 port.

 

0 Kudos
Message 3 of 6
(5,568 Views)

You'll need to figure out what that default process might be.

 

A common error is for someone to open up the manufacturer's software for communicating with the device, and failing to close it out before using LabVIEW to communicate with it.

0 Kudos
Message 4 of 6
(5,565 Views)

Hi Ravens,

thank you for reply.

I haven't active process or application. I don't insert cable. I want see that I have an available com port.

 

0 Kudos
Message 5 of 6
(5,557 Views)

Hi,

you can find the possible causes as well as the solutions to the specified error in the following document:

 

Error -1073807246 Using NI-VISA
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NeQSAU&l=it-IT

Regards,

Alessia

0 Kudos
Message 6 of 6
(5,481 Views)