
PCarson (Customer) asked a question.
DL-06 to Viewmarq Modbus/TCP register write
We have a system of DL06 plc's connected to our HVAC system and want to place ViewMarq panels for displaying real time data to operators.
We purchased a 4X12 panel and i have been trying to program using Modbus/TCP for ease of upgrading. the examples given in the ViewMarq software work for sending the display message but i cannot figure out what i'm doing wrong to update the Register for the Variables.
Our display should read:
Temp: XX.XF
Humd: XX.X%
I can get the temp and humid to display but don't quite understand how to write directly to the Modbus registers for the numeric variables.
Any example programming would be helpful.
We are using the WX command to write the string to the Viewmarq. it is functioning for the string.
i am attempting to update the variable data for temp/humidity. directly to the Modbus address in the Viewmarq. using the same technique as in the example for writing the message.
VPRINT to memory then correct Vmemory location count to an even # and LDK301 (our Ecom slot and device), LD vmemory size of data, LDA Data and last is WX to Modbus address in the Viewmarq.
if is send a register with 0 the display shows 0.0 as formatted. but if i have any value in the register the display shows ###.# so i assume i am updating the modbus address but not formatted correctly?
if someone has done this same operation i just need an example of what logic they used.
thank you
The problem might be that you're writing data you want to display into the high word register on the ViewMarq instead of the low word register. The high word is the first register of each variable by default, and should only be used if the number you want to display is greater than 65535.
If you write a number larger than the four digits you've allocated in the message the ViewMarq will display every digit as a '#'.
Try writing to the low word register (which should be one modbus address higher) and see if that works. If not, check to make sure "Word Swap" isn't enabled in the ViewMarq software, as this would switch which register is the high and low data for decimal variables.
I was trying to send to the High word. i tried sending to the low word. 400100 High 400101 Low. It still displays #'s.
No Word swap or Byte swap is enabled. The message into the Command String Buffer works.
The data i'm trying to send is 4 digits long. temp with one decimal place. in DS is shows properly. I feel it's not formatting the information to the VM correctly.