LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using StopNet Copley Controls with Labview. RS232 Serial Port

Solved!
Go to solution

Hello,

 

As the title says I am trying to interface StopNet Copley Controls (CME 2.0) with Labview via RS232 Serial Port. I am having issues sending ASCII commands in NI software. I can confirm that the ASCII commands do work with CME2.0. The RS232 cable is connected to the host computer via USB to RS232 connector by StarTech.

 

The problem:

When entering the commands the VISA Test Pannel I get the error: (Hex 0xBFFF0015) Timeout expired before operation completed. No ascii commands appear to be sending. Serial Settings appear to be set correctly; baud rate (115200 (device is 9600 when it boots or resets)), data bits (8), stop bits (1), parity (none), flow control (none). COM Port is correct of course. 

 

What I have tried:

Increasing timeout (ms): default is 2000ms. increased by 1000ms each attempt up to 10000ms. 

 

Using various serial write read vi's. These include the one provided by NI and my own variation that does and one that does not include bytes at port. Serial settings for these vi's appear to be correct and I also played with turning termination characters on/off. VI's were written in LabView 2021 SP1.

 

Any ideas? I would like to use serial port so I can send ASCII commands instead of etherCAT which copley provides a vi package for.  

nimax error.JPG

0 Kudos
Message 1 of 2
(220 Views)
Solution
Accepted by topic author joombah

According to this manual you have not fully understood the command syntax correctly.

 

[node ID][<.>axis letter] [command code] [command parameters]<CR>

 

<CR> is the convention to use for Carriage Return. This is in backlash escape syntax \r but you use \n which corresponds to Line Feed or <LF>.

 

Try with "g r0x32\r" to read the ram address 0x32.

 

Without the correct termination character the command processor of the device sits there and likely waits until the universe dies, before attempting to parse the command and respond accordingly.

 

 

Rolf Kalbermatter
My Blog
Message 2 of 2
(188 Views)