LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

west instruments modbus rs485 MLC9000 MLC 9000 lookout

Hello!
I try to contact my MLC9000 module via modbus OPC server, but I fail.
In the manual from west instruments (part of danaher corp.), there is
an example for an address:
97 3 0 0 25 0 1 92 109 (in dec)
61 03 00 19 00 01 5c 6d (in hex)

How can I send this signal via modbus OPC-server (lookout) to the west equipment?

Best regards Stefan
0 Kudos
Message 1 of 21
(4,601 Views)
Hi Stefan

I have found this message in our forum:

"Lookout, for the simple purpose of acting as an OPC server is very easy to configure. However, this procedure will only work with a developement version of Lookout.

First start Lookout and open a NEW process. Next, go into edit mode and create a Modbus object (Object>>Create). Configure the Modbus driver according to your specific system requirements. Click OK on the Modbus object properties panel. Finally, save this process by going to File>>Save As.

At this point, Lookout is ready to act as an OPC sever and allow you to access the Modbus driver through an OPC/Datasocket connection. This Lookout process must, however, remain running to continue this functionality.

For more information, please review the valuable information found in the Lookout Online Help which
was installed with Lookout. There you will find tours, tutorials, examples, and reference materials that are vital to understanding Lookout."

I hope it helps
Manuel Wielander
NI
0 Kudos
Message 2 of 21
(4,582 Views)
You need to know if your are talking modbus rtu or modbus ascii. It makes a difference in how you decode the messages. 97 is the address you are trying to read from. 3 is the modbus function code for read registers. The next number should be the starting address for the register read, then how many registers to read. The rest is checksum characters. When using an opc server, all of the communication strings should be handled by the server software. You don't need to worry about that stuff. Define the addresses that you need to read inside the server software. The MLC9000 manual should tell you what register addresses to read/write.


http://www.schneider-electric.ca/www/en/techpaper/html/tn054.htm
Message 3 of 21
(4,576 Views)
Look at the section starting on page 5-1 in this manual.
0 Kudos
Message 4 of 21
(4,573 Views)
Hi Manuel,

thank you for your answer, in the meantime I think I found
the answer to my question, I need probably two things:
1.) A C-compiler
2.) Lookout Object Developers Toolkit
(http://sine.ni.com/nips/cds/view/p/lang/en/nid/12524)

Regards, Stefan


P.S.:
I made a mistake in my question:
I confused the issue, my frontend is called "lkopcsrv.exe",
but I thing it works like "lookout".
0 Kudos
Message 5 of 21
(4,558 Views)
I'm still wondering if I can make contact to the MLC9000
via modbus-RTU-opc-server, without having a specific
"*.cbx"-file (object file).
In the help there are several addresses documented,
e.g., for mobus RTU:
Data Member: Type: Read: Write:
30001 - 39999 numeric yes no

Description:
16-bit input registers encoded as unsigned binary integers ranging from 0 to 65535.

But how can I send the read signal:
97 3 0 0 25 0 1 92 109 (in dec)
61 03 00 19 00 01 5c 6d (in hex)

And than read the reply.

Regards, Stefan
0 Kudos
Message 6 of 21
(4,555 Views)
Hi unclebump,

thank you for your answers!

I found also two thinks that my be of interest in this
matter:
There is a tool to write your own object files (*.cbx), called
"Lookout Object Developers Toolkit"
http://sine.ni.com/nips/cds/view/p/lang/en/nid/12524

And if you are frustrated with that, you can try the
"Modbus Library for LabVIEW" nimodbus.zip" (a lot of MODBUS-VIs):
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F1582737BACF5CA8E0340003BA7CCD71

Regards, Stefan
0 Kudos
Message 7 of 21
(4,553 Views)
Try a demo download of the kepware opc server. www.kepware.com It will run for two hours in demo mode. Close the file and reopen for two more hours. It will talk modbus or modbus TCP. It has a quick client that will show data values. Are you using the DSC engine??
0 Kudos
Message 8 of 21
(4,552 Views)
Hello Unclebump,

I'm working with LabView, I never used LabVIEW Datalogging and Supervisory Control Module (DSC).
Thank you for the tips with the OPC-server, but I did not manage make proper use of it 😞

But I made some success with the NI modbus OPC-Server 🙂

My serial read signal is e.g.:
6303 0004 0001 CD89 (hex)
1. byte [63] means: bus address 99
2. byte [03] means: read holding
3. byte [00] means: input value
4. byte [04] means: parameter nr 3
5. byte [00] is first byte of the word: "nr of words to read"
6. byte [01] is second byte of the word: "nr of words to read"
7. byte [CD] means: first 8 bit off CRC16
8. byte [89] means: second 8 bit off CRC16

For me is the second word (byte 3 + byte 4) of importance.
0004 (hex) is equivalent to 0004 (unsigned integer(uint)).

I know the value of 0004, it is -10 (or FF9C (hex)),
when I send the signal direct to the MLC9000 the answer
is: 6303 02FF 9C00 15

The last two bytes represent the CRC16 (= 00 15 (hex)).
And the value is represented by the 4. and 5. byte:
FF9C (hex) = -100 (uint)
(So to get the proper value I have to divide by 10.)

NI Modbus OPC sever offers me the data member SD300004,
but the result is not as expected,
it is: 52494136.
When I change the value of the polled address form -10
to -20 this value changes to: 52494236 (difference of 100).
So there seems to be a logic in it. But I'm lost.

Perhaps it has something to do with my hardware, it uses
the "Medicon"-Modbus RTU standard (you can find that in
the advanced settings in the NI OPC modbus server).
The answer is a 16-bit signed integer.
The SD3XXXXX data members represent a 32-bit number,
but also S3XXXXX is not working, when I use the data
member S300004 the result is 800 (for the value -10)
and it is not changing, when I change the value to -20.

Has someone an idea for that strange behavior?

Regards, Stefan
0 Kudos
Message 9 of 21
(4,541 Views)
Try the following:
Insert in a 32bit unsigned integer control the number
52494136 and than change the data representation to
16bit signed integer, guess what happens 🙂

After a discussion with a colleague I understand the phenomenon now:

52494136 (U32) is the same as 320FF37 (hex)

and

-200 is the same as FF37 (hex)

But why is the data member S300004 not working?
Or what is the correct data member for a signed
16 bit number?

Regards, Stefan
0 Kudos
Message 10 of 21
(4,527 Views)