LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Modbus and a CAL 3300 Temperature controller needed!!

First run 2 wire-auto

Second run 2 wire-EchoDTR

Thrid run 2 wire-CtrlDTR

 

Had to change the extension to doc

0 Kudos
Message 31 of 63
(1,557 Views)

Just got a chance to look at this...Looks like you're sending out the request to read multiple input registers (confirmed that in the log) and it occurred to me that this code might not be supported. I looked back at the modbus RTU guide posted on pg 2 (http://forums.ni.com/ni/attachments/ni/170/840085/1/modbusrtu.pdf) and according to page 9 my hunch was correct. It says function code 4 is not supported and in the notes it says that it does not respond with error code 1. Since this is the case, I'm not surprised you're seeing a timeout -- the device is not correctly programmed to respond to the request. Unfortunately this means most of the testing you've done so far is invalid because you were changing serial settings for a device that was ignoring you 😕

 

To be clear, I've also confirmed this in the log you provided. As I mentioned in my previous post, VISA is going to be monitoring the port with a series of "viGetAttribute(....ASRL_AVAIL_NUM...)" calls and you can see in your log that these calls return 0, meaning we don't see *any* bytes at the port.

 

Recommendations:

-Change your function call from reading input registers to reading holding registers (also called output registers, but they are frequently used for both input and output).

-If you don't get communication, make a few attempts with various serial settings.

-If you *still* don't get communication, use NI I/O trace to look for data at the port. You'll see this if the last parameter is anything besides 0.

iotraced.png

0 Kudos
Message 32 of 63
(1,535 Views)

I've tried the various read functions along with different wiring configurations to no avail. I've also tried to read from various addresses. So my thoughts are that maybe the connection isn't working. Is their a quick and inexpensive way to hook something up to check whether or not communication is being sent.

0 Kudos
Message 33 of 63
(1,510 Views)

Does anybody have any advice on how to troubleshoot this?

Thanks

0 Kudos
Message 34 of 63
(1,491 Views)

Hey all,

 

Sorry I haven't had a chance to respond to this until now. Yes, I did come up with a sloution, might not be the best and certainly could use optimization, but hey, it works for my needs.

I think I did have to download some MB specific stuff, so let me know if you can or can't see the blocks in it.

 

Since my original post I have used over 12-15 of these for different applications.

 

This is a program I use relably for a Glucose synthesis, so I know it works. The device address has to be 1 as written.

 

as far as your com lines to Rs232 goes: Rx 2, Tx 3, Gnd 5. http://www.advindsys.com/Manuals/CALManuals/CALgraphixappguide.pdf

 

Let me know if this works and I can help you troubleshoot from there.

Message 35 of 63
(1,472 Views)

Thanks for the reply. I now know that this can be done. I can not see the MB stuff. Can you give some information on what it is and where to download it.

Thanks

0 Kudos
Message 36 of 63
(1,459 Views)

I think this NI modbus library was used.

Best regards,

CsabaF
0 Kudos
Message 37 of 63
(1,452 Views)

Yep I believe that is the one!

It really helps.

0 Kudos
Message 38 of 63
(1,446 Views)

Thanks guys. I will try it out and see if I can get something working.

0 Kudos
Message 39 of 63
(1,441 Views)

Yep, let us know how it goes. And make sure your address, port, baud rate, etc. is set up correctly on the TC itself and in the program/computer.

0 Kudos
Message 40 of 63
(1,434 Views)