Control SCPI instrument from simulink

6 vues (au cours des 30 derniers jours)
Tobias Kammler
Tobias Kammler le 19 Juin 2023
Commenté : chrisw23 le 20 Juin 2023
Hi,
i'm trying to interact with a power supply controller from simulink via SCPI commands to set voltage and current for an electrolysis-stack. The device uses a serial RS232 interface and I've plugged the cable from the controller via an addapter into the USB-port of my PC. I'm able to control the device with the supplied software (so i dont need to install an other driver?!), but i dont manage to get a connection to the device from simulink ("PSC RS232 EXT" from Delta Elektronika).
I'm using the "query instrument"-block to send the SCPI command and get a response and test the connection, but could also use the "serial receive"-block. The instrument should identify it self with the command *IDN?
The configuration parameters (COM1, Baudrate) are set correct, and the manual says that it can be controlled with SCPI commands from other programs. I also tried to receive the voltage of the power supply. When i sent the query command to receive the voltage and set the data format to binary the Display showed "82".
Does anybody know what i'm doing wrong?
Is it a problem with the data format?
  1 commentaire
chrisw23
chrisw23 le 20 Juin 2023
Check your Windows Device Manager for the COM Port used. COM1 is not common for Serial-Usb converter com ports. Typically they start at COM3. Just to check...
Before you can send cmds and queries a communication session must be opened and it has to be closed too. The supplied software can't be used in parallel. The session is probably exclusive to one application.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by