07-02-2024 07:18 PM
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.
Solved! Go to Solution.
07-03-2024 02:21 AM
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.