Problem with modbus communication data format

R

Thread Starter

roy

I am trying to connect a FUJI Temperature control instrument with the PC serial port, but the instrument communication protocol is the modus protocol, synchronizing. Does it have the start bit, and how i connect the instrument to the pc serial port?
 
First you have to get the hardware straight.

You must first establish whether the Fuji has an RS-232 comm port or an RS-485 com port. The PC com port is RS-232 and/or ethernet. The ports must 'match'.

If the Fuji is RS-485, then you need to get an RS-232/485 adapter. I discourage people from using port powered adapters (adapters without an external power supply) particularly with laptop computers because of the problems encountered with such.

Then you need a properly wired cable.

An RS-232 cable will need to have each device's Tx line connected to the other device's Rx line and a connection to signal ground, at a minimum. The Fuji manual should provide help on this task.

RS-485 typically uses terminology for the data lines like 'A' or 'B'. Presumablly A connects to A and B connects to B. Unfortunately, not all As are As, nor are Bs Bs between different manufacturers. Sometimes the designations are flipped and one connects A to B and B to A to get it to work. Reversed connections will not damage the components, but won't work.

Once you have your hardware connection done, you have to set the comm parameters: baud rate and data word format:
- number of data bits
- parity or no parity
- number of stop bit

There are numerous formats that Modbus uses, most likely either signed and unsigned integer, or one of the 4 formats of floating point for PVs and SPs. The Fuji manual should explain which format it uses for the parameter you select. The application program that communicates with the slave needs to know the format the data is in.

Regarding your question about the start bit, by definition, RS-232 or RS-485 use start bits.

Check the Fuji manual for what it expects for comm parameters and how to establish them and which data format Fuji uses.

Once you've got hardware and comm parameters setup, you need some software.

Modbus is only a protocol that defines how devices communicate with one another. Modbus is not an applications program.

Modbus is a master slave protocol. The Fuji controller is a slave device.
The Fuji won't speak unless requested to respond by a perfectly formatted request message (including a proper CRC value) from the master.

Applications known generically as HMI programs typically have Modbus drivers and can act as a Modbus Master and can accomplish tasks like data acquisition, changing setpoints, changing alarm setpoints, monitoring alarm.

There are utility test application programs, like Modscan32 (published by Win-tech) that act as a master and can format messages and allow one to read responses and to write values to the slave.

With such a utility, you could read the PV and write a setpoint, once you've looked up the Modbus address for each and entered them into the utility program.

Fuji probably has some low end HMI program for data acquisition, monitoring, setting SPs and such. You might consider such since there's probably a document that specifically addresses the connection and setup of a Fuji controller.

Happy comms,

Dan
 
Top