A tutorial on how to install the C/C++ Tools for SCADAPack and a demo on how to read and write to Modbus address.
Below is the snippet of the program that is demonstrated on the vlog.
#include <ctools.h>
#include "nvMemory.h"
extern "C"
{
// add prototypes here
}
int main(void)
{
//fprintf(com2, "hello, world\r\n"); // Output to serial port COM2
BOOLEAN status1, status2;
INT16 dintTest01 = 0;
while (TRUE)
{
request_resource(IO_SYSTEM);
status1 = databaseRead(MODBUS, 41992, &dintTest01);
status2 = databaseWrite(MODBUS, 41994, dintTest01);
release_resource(IO_SYSTEM);
}
}
Reference
- What are C/C++ Tools for SCADAPack?
- SCADAPack 300 & 4203 C++ Tools – User and Reference Manual
- Telepace C Tools – User and Reference Manual
- SCADAPack C Tools – C Tools for Legacy SCADAPack Smart RTUs
- SCADAPack 32 C++ Tools – C++ Tools for SCADAPack 32s
- SCADAPack C++ Tools – C++ Tools for SCADAPack 300 & 4203
- Telepace Studio – Standard SCADAPack Relay Ladder Logic