2024-04-06 01:33 AM
Hi everyone,
I'm using the STM32F4 Discovery board to communicate with DC Power Supply Programmable ODA OPM Series using RS232.
Now, I can send SCPI commands to device (OUTP ON, OUTP OFF, VOLT 10,...), but when I send some query commands, I can not receive any response from the devices.
I tested to receive data by Hercules and it worked.
Can you help me to resolve this problem.
Best regards.
Solved! Go to Solution.
2024-04-11 06:54 AM
Thank you for your reply.
I have a problem with my TTL-RS232 module. When I connected VDD on the STM32 Discovery board to VCC on the RS232 module, I could send the signal to the device but not receive any signal. When I connected 5VDC on the board to VCC on the module, it worked.
2024-04-06 01:53 AM - edited 2024-04-06 01:56 AM
@qhaoqt wrote:Now, I can send SCPI commands to device (OUTP ON, OUTP OFF, VOLT 10,...), but when I send some query commands, I can not receive any response from the devices.
I tested to receive data by Hercules and it worked.
It's just a matter of sending & receiving text strings.
If it works with a terminal (I presume that's what you mean by "Hercules"?), but not with your code, then there's something wrong with your sending, receiving, or both.
So check where your code differs from what you do in Hercules:
Instead of connecting your STM32 to the PSU, connect it to your terminal:
When debugging serial comms, it is essential to have some means to observe both what the microcontroller is sending to the device and what the device is sending to the microcontroller - it's a two-way conversation!
https://www.avrfreaks.net/s/topic/a5C3l000000UaFXEA0/t153137?comment=P-1212903
2024-04-11 06:54 AM
Thank you for your reply.
I have a problem with my TTL-RS232 module. When I connected VDD on the STM32 Discovery board to VCC on the RS232 module, I could send the signal to the device but not receive any signal. When I connected 5VDC on the board to VCC on the module, it worked.