LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

0 bytes at serial port after Visa Write

Hi,

 

I'm having problems communicating with a Pollux box controlling a stepper motor (both from Micos). The Pollux box has an RS232/485 connection to the computer. 

 

I have tried adaptations of LV's Basic Serial Read and Write example. Even for the basic example there has never been any bytes at the serial port after the write.

 

I have attached some sample code for LV 10.0.1(64bit) and the OS is Windows Server Enterprise 2008.

The Visa drivers have just been installed.

After some research I have added a 'Set I/O buffer size' as advised by http://digital.ni.com/public.nsf/allkb/60DDFED7EFEFE7188625705700750821?OpenDocument

 

The time-out is set to 10s, I have a wait of 1s before read and 0.5s between each write (the characters are written individually incase that was the problem).

 

The write command getaxisno_ should reply with the default axis no which is 1. However, there is never any reply.

The termination character for Venus2 is a space for transmitting commands and ASCII CR LF at the end of received data.

 

I'm not sure what else could be wrong. According to MAX the device is working properly. Although, when I try to open a Visa test panel in MAX the program crashes. I'm not sure if this is a related problem.

 

I'd be really grateful for any advice, have been trying to fix this for a few days now.

 

Thanks in advance!

Ciara

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

Hi Ciara,

 

does the communication work when using HyperTerm (or any other program able to serve the RS232 port)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,776 Views)

Unfortunately Windows Server 2008 doesn't seem to have Hyperterminal and I can't seem to find an equivalent.

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

Do a search for Putty and see if that will install. There are so many things that could be wrong - com settings, wrong cable, and perhaps the termination character is wrong. Explain exactly what you mean by 'the program crashes'.

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

Hi Ciara,

 

you could either copy HyperTerm from an older Windows installation (you will find information on that matter in the internet) or you just g**gle for "HyperTerm replacement"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(3,765 Views)

Thanks, I'll search those now.

 

When I click the test panel button, the Max window disappears and the program is closed. Next time I open it an Unexpected Error box opens with a message saying there was an unexpected error and I should search Info Code MAXKnownException.

 

'The exception occurred in the NIMax process in the function (Unknown).'

 

I have searched this and the info advised me to send a report with log files etc to NI which I have done. Just waiting on the reply.

 

I copied the Visa resource name from MAX and the termination character is the same as what a previous owner of the equipment used in Visual Basic. 

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

ZOC is a powerful terminal program that allows to set any kind of parameter set and terminal emulations for serial connections. I think not the current but older versions are free. Look at:

 

http://www.emtec.com/download.html?what=zoc#zocfiles

 

Cheers

Edgar

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

Just to update - I tried using Hyperterminal and couldn't communicate. Turned out the wire was faulty! Labview now working fine with the device.

 

Many thanks for all your advice. 🙂

 

Ciara

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