LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 8.20, Serial Modbus, and Despatch Oven Controller ... pointers for modbus master application?

Extreme Newbie needs pointers for getting started in an attempt to connect a Despatch Oven "LAC-6" Series Protocol Plus (LAC 1-38A-6 which appears utilize the Modicon/Schneider Modbus protocol) to Labview 8 application.

Need to develop modbus master application for SERIAL interfacing  with the "Protocol Plus Slave Controller" ( Slave only, Transmission mode - RTU only)

  • I have started to plow through various resources; http://www.modbus.org, this site, and forums etc...
  • I have contacted Despatch and National and there are no authored labview libraries that have been created at this time.
There appears to be some confusion if the NI Modbus library actually works within Labview 8.20 as shown in:
http://zone.ni.com/devzone/cda/epd/p/id/4756

Does anyone know if this library will work or is there plans for an update due to some errors???

Any additional pointers would be greatly appreciated


Thanks for your time
jqm


Message Edited by Support on 01-22-2008 08:56 AM
0 Kudos
Message 1 of 19
(9,044 Views)
We have used the NI-Modbus (serial) library in 8.20.

I would start by trying out the MB Serial Example Master.vi and MB Serial Example Slave.vi first. You could use two computers -- one as Master another as Slave, or use a null-modem cable to loop from one COM port to another on the same PC. Once you have this working, replace the Example Slave VI with your Despatch device.

Good luck!

-Khalid

Message Edited by Khalid on 10-06-2006 09:27 AM

0 Kudos
Message 2 of 19
(9,015 Views)
Khalid,


Downloaded the nimodbus.zip which extracts to a windows installer package, upon execution of this file there was an error stating that I needed to have Labview 7.1 installed !!!
I am using Labview 8.2

I did some searching but came up short...

I did see a link here, but halfway down there is a link for instructions for installing into Labview 8, but it doesnt work.
Could you point me to the installation for the NI Modbus?


Thank  you
jqm
0 Kudos
Message 3 of 19
(9,008 Views)
jqm:

The ModBus drivers also come with LabVIEW DSC module, depending on your application, it may be easier for you to get that module. Please let me know if I can help in any way.

Best Regards,

Rudi N.
Applications Engineer
0 Kudos
Message 4 of 19
(8,984 Views)
Rudi,


Now I am a bit more confused (not hard to do Smiley Happy  )

I was under the impression that Labview Profesisonal did Modbus (due to the NIMODBUS library),
now you are suggesting that an additional modules Labview DSC ($2500) and OPC Server ($1000) ???  
Wow!  That cost more than the oven that I am trying to control !!!!


Is it that the Datalogging and Supervisory Control and OLE for Process Control would make the development simplier? 
.......or is it required because Labview Professional Package DOESNT do MODBUS ?


Current Desired Goal:
Create an application that will log mV voltages on different channels (and oven temperature) with an Agilent 34970A multimeter... the application will record initial conditions and outputs, then the application would control the oven (SERIAL MODBUS) and it would go to a HOT temperature, hold for a period of time and again record the mV voltages and oven temperature, and again the temperature will go back to AMBIENT, hold for a period of time and take another set of readings.... from this thermal performances can be calculated and then a printout of results made.

Further Detail on oven can be found HERE, on their description of the Serial Modbus Implementation HERE

My current concern is whether or not the Labview Professional Package can cut it alone...

Comments on this newbies dillema?

again, thank you for your time
jqm




0 Kudos
Message 5 of 19
(8,967 Views)
Khalid,

After plowing through a bunch of posts I did find an obscure forum post where someone broke up the NIMODBUS library titled "Watlow Series PD VI, Modbus TCP, or Ethernet Example".... 5/5/2006 Chris_R. posted modbus71_80.zip, from this I pasted the extractions into the directories where Chris_R. Suggested.

Current Software:


Labview 8.20 Professional


MAX 4.1.0.3001


NISPY 2.4.0.49152


VISA 4.0

I am attempting to use the MB Serial Example Master and the MB Serial Example Slave to do some testing as per your suggestion.
I am also making the assumption that the crossover cable is 'technically' an RS232 Null modem WITHOUT HANDSHAKING where the DSUB 9 is wired (Pin 2 to Pin 3, Pin 3 to Pin 2, and Pin 5 to Pin 5)
(is this correct?)

The computer that I am using does not have RS232 ports, so I am using (2) Belkin 5FU409-CU (USB to Serial Adapters). 


MAX shows that both are VALIDATED and working fine with the following settings:  Baud: 9600, Bit=8, Parity = NONE, Stop Bits=2, Flow = None ... one device is on COM4, the other is on COM5

When I open up and follow the directions according to the example for the MB Serial Example Master / Slave (COM4=Slave, COM5=MASTER)... nothing happens.
each of the Belkin USB to Serial adapters has LEDs which indicate LINK, TX, and RX.... the LINK lights are constant ON.

When I change the Masters Register to write to all 1s and then toggle one of the coils to write switch there is no change to the slave registers or visa versa.  About every  10s the COM5 shows a TX and the COM4 shows an RX regardless of me toggling the switches or not.

I ran NI SPY to try to capture what was going on when the RX TX goes at some oddball interval that is not consistent with me toggling one of the coils to write switch......

90% of the time it is just:

1759.  VISA Get Attribute ("COM5", ASRL_AVAIL_NUM, 0) Process ID: 0x00000E90         Thread ID: 0x00000CCC Start Time: 11:33:13.943       Call Duration 00:00:00.000  Status: 0 (VI_SUCCESS)

and when the TX light goes on:

1761.  VISA Get Attribute ("COM5", ASRL_BAUD, 9600)  Process ID: 0x00000E90         Thread ID: 0x00000CCC     Start Time: 11:33:14.023       Call Duration 00:00:00.000   Status: 0 (VI_SUCCESS)
1762.  VISA Write ("COM5", "........~.")                                  Process ID: 0x00000E90         Thread ID: 0x00000CCC  Start Time: 11:33:14.023       Call Duration 00:00:00.000  Status: 0 (VI_SUCCESS)

Am I missing some trick?: timing issue, setting burried in one of the subvi's?  The wrong type of crossover cable?  or is it flakiness within the NIMODBUS library?

 Any suggestions or comments, or explanations  would be great.

Thank you for your time in this matter,

JQM

 




0 Kudos
Message 6 of 19
(8,961 Views)
jqm:

Thank you very much for the clarification. I have spoken to our Product Support Engineer about this issue and we are working on fixing the link to the page where you can download the drivers for your LabVIEW version. I will let you know when the page is up. If this issue is urgent, please email in your request, be sure to mention my name in the email and I will get back to you that way. Thank you very much for your patience.

Best Regards,

Rudi N.
Application Engineer
0 Kudos
Message 7 of 19
(8,944 Views)
Hi JQM,

There ought to be something wrong with the cabling/USB-Serial adapters. I just tried this with two "virtual" serial ports in LV8.20, and I am able to communicate between the Serial Master and Slave VIs.

Maybe you can try the same. You can download the trial version of the virtual serial port software from here:

http://www.fabulatech.com/virtual-serial-port-kit.html

This will at least isolate the problem a little.

Regards,

-Khalid
0 Kudos
Message 8 of 19
(8,943 Views)

Hello jqm,

I am sorry to catch your post this late - I usually check the boards fequently but haven't for a few days... Anyway, I am an engineer at Despatch Industries that has created PC software products to monitor & control the Protocol Plus controllers used in many Despatch ovens.

I do not intend to advertise our products here, be we have given free support in the past to customers trying to write communication programs for the Protocol Plus, including code examples in LabView and Visual Basic. These examples demonstrate using the MODBUS RTU protocol as you might like to use it.

I would recommend contacting Despatch service (again?) through the 800 number stuck somewhere on the oven and explain what you need, they will probably have you talk to me & I can send you the code examples if you want. Be sure to mention that you would like LabView examples. I don't think I was involved with your previous contacts with Despatch.

I hope I can assist you if you still need help.

Brian

Message 9 of 19
(8,931 Views)
Khalid,

Thank you for your response.
I downloaded and istalled the Virtual Serial Port Kit and created a virtual link COM4 to COM5 with the following Properties:
General Tab: Bitrate Emulation is DISSELECTED
Pinout: Full Handshake, Selected DTR to DCD

Both COM ports show correctly in MAX and were Validated with the following settings: 9600, 8, Non Parity, 2 Stop Bits, NONE
I was successful in sending text files back and forth with each of the COMs via Hyperterminal.


As long as these are the settings that I am supposed to use (within properties of the Virtual Serial Ports),
then the Modbus Serial Master/Slave vi from the NIMODBUS library still behaves as my first attempt with the USB->Serial Port adapters.
I believe this suggests the NIMODBUS library.....??....

I will continue testing with various combination of settings within Virtual Serial Port Kits....


Khalid...Could you please verify :

1) what your settings are for the Virtal Serial Port kit is,
2) your NIMODBUS library install ... is it done with the NIMOBUS71_80.zip extraction?  or did you go through the NI upgrades, and it just carried through?

Again, thank you for  your time and patience in this matter.
JQM
0 Kudos
Message 10 of 19
(8,924 Views)