LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Don´t give up, I know that Modbus can be frustrating sometimes.

I quickly run through the documentation you provided. It seems that the setpoint parameter is at decimal address 127 (or 128, depends on the modbus driver you use). I think you can read it, but to write a new setpoint you have to do additional setup to two other parameters since the setpoint parameter has some kind of protection level.

You try to read 10 bytes from address 0, but I think there is no data there, so it might explain your timeout message. Try to read 2 bytes from address 127 or 128 instead, hopefully it will help.

Best regards,

CsabaF
0 Kudos
Message 21 of 63
(1,315 Views)

Alright still trying. Still get a time out trying to read from 127 and 128. Started wondering if my wiring was correct. Tried various wirings and still get the timeout. Attached are images of how to wire the CAL 3300 and LabVIEW pinout. I have a RS485 serial board in the CAL 3300. I've connected slot 9 from the CAL (TX/RX+) to pin 3. Slot 10 (TX/RX-) to pin 2 and slot 11 (GND) to pin 5.

Download All
0 Kudos
Message 22 of 63
(1,291 Views)

This is what my code looks like now. Don't know how the Hexadecimal stuff works with what I enter.

0 Kudos
Message 23 of 63
(1,283 Views)

56 is likely due to lack of communication. Modbus has an error response system, so if your device even comes close to following the spec you should get something besides error 56 back.

 

Likely culprits:
1-You set labview to use device id 1. Have you made sure to change this on your device as well.

2-Labview is now using even parity, have you set your device to "option 1"?

3-It sounds like you are using RS485 2-wire mode. Have you confirmed that the serial port is set to 2-wire mode? You can do this with a property node.

Message 24 of 63
(1,276 Views)

I did change the device ID to 1.

I did not change the parity to option 1. That is now done.

Attached is the screen shoot of Measurement and Automation Explorer. It says four wire, but is grayed out. I do not know how to change this or what the property node is associated with to change this.

Hopefully I'm getting closer to getting some response from this controller.

0 Kudos
Message 25 of 63
(1,271 Views)

3-It sounds like you are using RS485 2-wire mode. Have you confirmed that the serial port is set to 2-wire mode? You can do this with a property node.

 

Alright I have no clue how to do this. I think the serial port is configured to four wire based on the attachment from my previous post.

0 Kudos
Message 26 of 63
(1,258 Views)

Before you initialize the modbus master, insert a property node onto the reference to the serial port. If you search the palette for "VISA property node" you'll find it.

 

Then, select Serial Settings >> Wire Mode and set that to 2-wire mode.

0 Kudos
Message 27 of 63
(1,244 Views)

Okay, everything that has been suggested has been done. I tried all 2 wire configurations for the property node. I still get error 56 (time out). I will try different wiring combinations to see if anything works.

 

Thanks to everybody so far.

0 Kudos
Message 28 of 63
(1,234 Views)

Nothing seems to work. I tried all different wiring configurations and changing the property node for each 2 wire configuration. This is how my wiring is:

Cal slot 9 TX/RX+ to pin 4 on DB9

Cal slot 10 TX/RX- to pin 5 on DB9

Cal Slot 11 Gnd to pin 1 on DB9

0 Kudos
Message 29 of 63
(1,226 Views)

Sorry, to be clear, I was assuming you were using 2-wire mode due to your description. I could be wrong on that.

 

So far we've assumed that the settings were wrong, but its possible something else has happened. Can you please follow the steps here:

http://digital.ni.com/public.nsf/allkb/282C5D41E2BA04F2862574BA007803B9?OpenDocument

and post the trace log. Please only select "NI-VISA" on the API selection. Also, please try a few different 2-wire configurations.

 

What this gives us is a list of all function calls made by the driver, so we should see 3 things:

1. A series of visa configure function calls which adjust port settings. You can safely ignore these.

2. A single write command with a size of a few bytes, maybe 8 or something like that.

3. A series of port read and/or property reads (checking the "bytes at port" property).

 

Part 3 is what we care about. If "bytes at port" shows 0 during the whole sequence and then error 56 is thrown, then you know your device simply isn't responding. If we get data back, we should be able to see what it is and perhaps identify why the toolkit isn't working.

0 Kudos
Message 30 of 63
(1,222 Views)