02-28-2007 12:46 PM
I have used Lookout 5.1 for more than three years in my company..
The whole system is getting the temperature and lighting control from about 30 rooms..
It also control’s 4 air condition system..
Everything works fine, but since november last year I have study Labview 8.0 and tried to do the same thing..
Finally I also have bought the DSC module..
I have read true almost everything in this forum just to collect enough information to solve my problems, but still.. I didn’t have any luck so far..
The system use MODBUS RTU serial communication, and I’m controlling a mastergenerator from Carlo Gavazzi witch controls my units by a bus system calls dupline.
With lookout I easily writes and read from my register like this example.
Write digital to 404097.1 and up to 16. And reading the temperature from the register 40257 and up.. These register is the same as UI8 in labview (0-255)
I have tried to use the DSC modbus server, and drag the components to my frontpanel…
When I start this, every component has a green sign.. SO it seems to me that they communicate true RS232. I use the same communication settings that my mastergenerator does.. (9600, 8, 1…. And so on)
So my question is.. what is wrong here?? Shouldn’t it be easy to make this work??
I have tried to read from 40257, changed it to 400257 and so on.. But nothing happen..
All components have the green sign, but still no results to see….
Anybody… ?? any idea?? Can anybody help me?
Maybe I have misunderstand something??.. but true the video about making a Modbus server with DSC, this should be easy…
I have tried to attach a piece of the modbus register from my Mastergenerator G38x0016
03-08-2007 05:20 AM
Hi,
Unfortunately your device does not support the loopback command. This is easy for interface testing.
I use the Modbus protocol in my program and I don't use the Modbus VI's from NI. Can you show how you create a modbus frame with CRC maybe I can help you further.
03-08-2007 03:57 PM
Hi KC.. and thanks for your answer..
I’m new at Labview, but have used Lookout for many years.
To create a MODBUS server with the DSC module is about the same as I do it in Lookout..
I create variables in the same way in Lookout than I do in the DSC module..
It’s the same registers in both of them, and the difference is that I communicate at once in Lookout when I have specified serial properties, but in Labview and the DSC module.. nothing happens..
I’m very sorry, cause I don’t know what you mean about loopback command here..
Am I missing something? Or do I misunderstand, or don’t understand how the DSC module works?
I communicate with my device, cause I have set up a small VI with VISA, and send a command to my device.. It works at once.. I sent.: 0110100000010200017651
The most important register for me is the holding register FC16 as you can see, and this register has a start address on 1000H The CRC is created with modbus tester, also crc-16 which comes with NIModbus..
So I could try to build up a communicating system with the VISA drivers, but if the DSC module could do the job easily, I could save my self for some work..
So what I am looking for is somebody that can help me with a small example (with the DSC module) that writes and/or read from my register FC16 start address 1000
I writes and reads single bits to this register in Lookout.. Starting with 404097.1 to 16 and up
to 404104.16 (1001 – 1008H)
So if you can help me with a small example I would be very happy.. Can you explain what you mean with loopback command?
I read temperatures from about 30 rooms in my school from starting address 40257 – 40384 (101- 180H)
I have attached the map registers for my device in a pdf file.
Thanks again…
Very best regards..
03-09-2007 01:27 AM
Hi Benji,
The loopback command is a standard ModBus command. You send 2 bytes the device returns those two bytes. Just a simple test to see if there is communication. Your device doesn't support this command so we can forget this.
If I understand you correct you want to use Labview with the DSC module (I don't have this module) to do the same.
I can make you a VI that reads a number of registers from the a address you specify at the input. Is that something for a start ?
03-09-2007 03:17 AM
Hi again..
And thanks for your answer and your help.. I understand what you mean now.. I have study a lot of examples, and I understand more and more.. Yes, it would be very nice of you if you could write me a small VI thats read from.. let's say one register at "1000"H. It's all I need to get e good start.. As I already told you I write to my device, so communication is ok..
Again.. thanks for your using your time.. Very best regards.. Benjii..
03-09-2007 05:04 AM
03-09-2007 06:53 AM
Thank you KC..
I'm very grateful for your help.. And I'm sure I will understand more and more as time goes by.. The only problem here was that I use Labview 8.0, and you have sent me your VI made in 8.2.. So I was not able to open them.. Maybe you can save them in a lower version??
Thanks again KC.. and I wish you a nice weekend.. Benjii..
03-09-2007 06:58 AM - edited 03-09-2007 06:58 AM
Hi,
So you told and I forget
Here it is in 8.0
Message Edited by K C on 03-09-2007 01:58 PM
03-11-2007 09:33 AM
Hi KC..
Just want to thank you for your help.. It works fine, and now I understand much more..
Very best regards.. Benjii...
03-11-2007 10:47 AM - edited 03-11-2007 10:47 AM
Hi Benji.
Glad to be of help. Just reply here if you have more questions about this subject.
When I will find the time I will finish my general ModBus communicator. It can be helpfull sometimes to have such a program.
Message Edited by K C on 03-11-2007 05:50 PM