LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to impliment labview/modbus with a Baldor H2 AC motor controller

Iam trying to control a Baldor vector H2 motor controller using labview and the modbus communications.  So far i have downloaded the ni.modbus.lib for labview 8.2.  I have not been able to get a responce from the controller.  If anyone has any tips or pointers that would be greatly appreciated.  Thanks  
Message 1 of 19
(5,541 Views)

I have some experience with Baldor H2 and MODBUS.  Some quick questions for you, how is your 485 set up?  Are you trying to read parameters or coils?  Do you have their MODBUS spec?

Steve

Message 2 of 19
(5,533 Views)

The comm settings are 9600 baud, no parity, one stop bit and the drive address is 1.  I am trying to read and write to coils.  I have found the modbus booklet for the drive "Series H2 Modbus RTU Protocol".  Iam not sure if there is another booklet for this drive.  I have set up the mint workbench software just to test my connection which so far is ok. 

 

Jarrett

Message 3 of 19
(5,527 Views)

Jarrett,

I have not used the NI Modbus VIs before.  I took a quick look at them and they don't seem to perform the same CRC and some of the other formatting is different than what the Baldor spec calls for.  I have attached a very simple VI that I use to talk to the H2 drives.  You may need to change the setup parameters in the "Init" case.  Then you have to create the data packet and press the "Send" button on front.

The 485 I was speaking of was the hardware.  Do you have your 485 converter set to 2-wire auto mode?

Hope this helps,

Steve

Message 4 of 19
(5,519 Views)

Iam using converter that uses +- Tx and +-RX into regular rs232 protocol. Is there a better converter to use?

 

Jarrett

Message 5 of 19
(5,513 Views)
 

I am using two converters:

1 - A B&B converter http://www.bb-elec.com/bb-elec/literature/485oi9tb-3803ds.pdf
2 - NI USB to 485 https://www.ni.com/en-us/shop/model/usb-485.html

Any two wire capable converter should work.  Did the VIs still not work?

Message 6 of 19
(5,510 Views)
Yep the VI's worked, thank you so much for the help. I may have some more questions, but for now this is working really nicely.
 
Jarrett
Message 7 of 19
(5,507 Views)

What would the code structure be to enable the motor attached to the drive start forward at a specific speed?

 

Jarrett

0 Kudos
Message 8 of 19
(5,490 Views)
You will have to send several packets of data to set up the drive to run the motor forward the first time after power up.  If you look in the modbus manual under control modes (table 7) there is a network mode.  Follow the commands in the right column.  You will also have to have the correct jumpers on the control board terminal block for enable, forward and reverse.  I have not done this through modbus yet so I do not have the exact packets to write.  I will try to look into this today.
0 Kudos
Message 9 of 19
(5,474 Views)
Iam not sure if this is correct.  When i send a data packet to the drive asking to read some coils all it returns is the exact data packet i sent to the H2
 
Jarrett
0 Kudos
Message 10 of 19
(5,463 Views)