LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with NI ENET-485/4

Hi everyone,

 

I have two ENET- 485/4 NI Hardware installed in two different remote locations. Each ENET has connected to its first serial port (it doesn't matter which port is) a Serial Power Meter.

 

If one ENET lost its communication link, the Power Meter associated with its serial port lost the communication (it is logical). However, if I try to re-open that port, the other Power Meter which is connected to the other ENET that has link, lost its communication.

 

I have the following software:

 

- LabVIEW 7.1

- DSC7.1

- IAS 5.0

- Windows XP

- NI Serial 3.1

 

Any help would be apprecciated. Thanks in advance.

 

Regards,

 

JC

0 Kudos
Message 1 of 8
(3,622 Views)

JCNT,

 

How are you communicating with both serial ports? Whenever an error occurs does the program stop? Are you closing the other port reference?

Does it return an error?

Send a screenshot of a simplified version of your application.

 

Dario Camargo

#1245127

0 Kudos
Message 2 of 8
(3,530 Views)

 Hi Dario,

 

Thanks for reply. Below the answers:

 

 

How are you communicating with both serial ports?

 

I open the serial port then write in it and wait for reply (read). The write and read action make them in a while loop. Then if I want to finish the communication with the instrument I stop the While loop and after that close the port (figure 1).

 

Whenever an error occurs does the program stop?

 

No, it doesn't it just report the error using an error indicator.

 

Are you closing the other port reference?

 

No, I'm not. The other port keeps opened (write and read in a while loop) and it lost communication with the instrument when I try to open the first portwhich lost the connection.

 

Does it return an error?

 

 - First port which has lost the communication: Unknown system error (when I open it)

- The other port which hasn't lost the comunication: Timeout

 

Send a screenshot of a simplified version of your application.

 

Figure 1

 

Thanks again

 

JC

0 Kudos
Message 3 of 8
(3,522 Views)

JCNT,

 

When you lose the communication of the first ENET are you stopping or aborting the execution? What's the full message it returns, including the error number?

If ENET 1 lost it's communication, does ENET 2 continue to operate normally until you restart ENET 1?

 

Set a temporization of 50ms on both loops.

 

Are you using two different ENETs or two different ports on the same ENET?

 

Dario Camargo

0 Kudos
Message 4 of 8
(3,501 Views)

Hi Dario,

 

Thanks for reply. Below the answers.

 

When you lose the communication of the first ENET are you stopping or aborting the execution?

 

 When I lose the communication neither abort nor stop the execution (timeout error) instead I re-opened the port and I get an "unknown system error" in the VISA Configure Serial Port.vi

 

What's the full message it returns, including the error number?

 

Code                   Description

-1073807360      Unknown System error (miscellaneous error). It ocurrs after I re-open the serial port of ENET1 which losts its communication.

-1073807339      Timeout expired before operation completed. It ocurrs in the serial port of ENET 2 after I re-open the serial port of ENET 1.

 

If ENET 1 lost it's communication, does ENET 2 continue to operate normally until you restart ENET 1?

 

Yes, it does. The ENET 2 get timeout error after I re-open the port of the ENET 1.

 

Are you using two different ENETs or two different ports on the same ENET?

 

I am using two different ENETs an each one of them has connected a Modbus equipment.

 

 

Thank you  for your time and I willbe waiting for your answer.

 

JC

 

0 Kudos
Message 5 of 8
(3,483 Views)

What configuration for stop bits and data bits are you using?

 

It could possibly be the error described on this knowledge base:

 

http://digital.ni.com/public.nsf/allkb/D2084EC381319CC386256A1D006F1415?OpenDocument

 

Dario Camargo

NI Brazil

0 Kudos
Message 6 of 8
(3,458 Views)

Hi Dario,

 

The stop bits is 1 and the data bits 8. I think it is not the error you describe.

 

JC

0 Kudos
Message 7 of 8
(3,454 Views)

Hi JCNT,

 

Probably you considered but you are using VISA Configure Serial Port default values because your equipament uses the same, isn´t it?

 

Other thing to do is increase the timeout value for your VISA session. Refer the follow link for more info.

 

http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument

 

http://www.ni.com/support/labview/visa/verr2.htm

 

http://digital.ni.com/public.nsf/websearch/E4F90AD24DEC9CC786256F4300605C02?OpenDocument

 

Jailton - NIB

0 Kudos
Message 8 of 8
(3,398 Views)