Constant to binary bit (TI-505)

jhuggart

Member
Join Date
Jul 2007
Location
Birmingham, AL
Posts
21
I am using a TI-505 to communicate over profibus with a Delta Motion Controller. I am new to PLC's and this is the first time that I have used profibus. My question is:

How do you send a constant to a single binary bit?

To initiate commands in the motion controller, the PLC must send a digit that refers to a specific command. I know how to turn bits on and off, that's easy. But I cannot figure out how to send, for example, '7' to bit wy43.3.

Any help is appreciated.

edit: By the way, I am using TISOFT6.0 to do the programming.
 
Last edited:
You can send a 7 to WY43 since it is a word. WY43.3 is a bit, and bits can only be a 1 or 0. I believe you are misunderstanding what the manual is saying needs to be done. A word (WY43) is made up of 16 Bits (WY43.1 thru WY43.16). When the value of WY43 is changed the state (0 or 1) of the bits WY43.1 thru WY43.16 will change. Likewise, if you change the state of the bits the value in the word will change.
 
Maybe my confusion is in the translation. The manual uses AB DF1 protocol for the example. There is a command that is called Move Absolute(20) that is used as the example in the user manual. There are some parameters for that command that go into the bits following the command bit. The instructions say:


Write 20 to F25:10
Write 5.2 to F25:11
Write 14 to F25:12
...and so on.

Is:

Write 20 to wy25.11
Write 5.2 to wy25.12
write 14 to wy 25.13

an incorrect interpretation of the instructions? If so, what is the correct interpretation?
 
Write 20 to F25:10
Write 5.2 to F25:11
Write 14 to F25:12
...and so on.

Is:

Write 20 to wy25.11
Write 5.2 to wy25.12
write 14 to wy 25.13

I don't think so. In AB F25:XX are individual words that can take floating point words. In TI WY25 is a single word typically integer.
I think what they want you to do is send a number that represents a bit pattern in binary.
If we are to count right to left for 8 bits:
00000001=1 WY25.01 on
00000111=7 WY25.1, WY25.2, WY25.3 on
00001110=14 WY25.2, WY25.3, WY25.4 on
Sound right guys? Or does the motion controller see things differently.
I haven't worked with Profibus so far.
I would say the receiving device will see the word as a bit pattern to turn stuff on/off/reset or whatever.
Clear as mud eh?
This method is used for I/O card setup and other devices at times.
 
First, it takes two words or two WY registers to send each floating point number but the first 32 bits are treated as a DWORD with the command in the lowest 8 bits in the word. What will make this tough is that.
1. The TI PLC doesn't suport 32 bit DINTS or DWORDS.
2. The TI PLC doesn't suport 32 bit floats except in SFC programms.
3. The TI PLC labels its bits backwards.

The TI plc is a little endian processor so the high byte and high word go in the lowest memory locations. 8 floats or 16WY registers are sent and received during an update.

First you need to identify how the data is passed back and forth. I would send a 1234H and see how it passed across the Profibus DP.

The best way to do this is to use some V memory and write the 8 floats to those memory locations and then copy the data to the WY registers.

Finally, it would be easiest if you use the user programs to do most of the work and just activate the user programs from Profibus DP. The RMC is much more capable at executing motion programs than TISoft.

I attached a page out of the manual so others can see what the OP is trying to do. Notice that the RMC uses 32 bit numbers only and the bits are numbered with least signficant bit as bit 0. The TI has only 16 bit registers and the most signficant bit is bit 1 and the least significant bit is bit 16.
 
Last edited:
Which RMC controller are you using? What type of machine are you putting it on?

Finally, it would be easiest if you use the user programs to do most of the work and just activate the user programs from Profibus DP. The RMC is much more capable at executing motion programs than TISoft.

I think this is true for the most part. The new controllers are real good at this. Depending on the application you may only need to send a few bits. Do you know how many variables you will need?

You may also want to look at the downloads on Delta's website

http://www.deltamotion.com/dloads/downloads.php?category=rmc100&subcategory=Examples
 
CharlesM said:
Which RMC controller are you using? What type of machine are you putting it on?
It must be an RMC75 because it has a move absolute command with the code of 20. The RMC150 doesn't support Profibus DP, yet.

It would have been helpful to know which WY register is the first one to be sent to the RMC. I believe the command goes in the second word because the first word is the most significant word and that has the hand shaking bits. This means one just needs top write a 20 to the second word and set TIs bit 16 on the first word to select axis 0 and toggle the write request bit on the first word by using an exclusive or function with 8000H.

The thing to do is to call tech or support on Monday when they will have access to a ti505. The will probably send a 1234H to the RMC and see where the different bytes show up in the RMC and then do the same thing going back to the TI505.
 
Peter Nachtwey said:
It must be an RMC75 because it has a move absolute command with the code of 20.

That is correct. I am using the RMC75P-AA1-AP2 to control a proportional hydraulic valve.

The only thing that I really need to communicate from the PLC is the input from height adjustment buttons. So once I get the bit order and everything figured out, it should not be too difficult.

Thanks for all of the help.
 

Similar Topics

I am new to using Functional Block Diagram (FDB) language programming in CCW. I want to set a variable to a constant if a contact is closed...
Replies
7
Views
350
Hello all, this is my first time working with a PLC and dealing with hardware, so please have patience with me. I have an electric rod-style...
Replies
21
Views
2,926
Hello, I have posed a similar question before, but the DB then provided me with pre-allocated "spares". In this instance I need to declare a...
Replies
13
Views
4,060
Hello gentlemen, Why does this work: VAR CONSTANT SIZE_OF_dutEVENT : UDINT := SIZEOF (DUT_Event); MAX_SIZE_OF_dutEVENT : UDINT := 5...
Replies
2
Views
1,549
Hi! I know there is a lot of skilled people with Schneider somachine in this forum, so i have to ask something. How and why do you use constant...
Replies
4
Views
2,137
Back
Top Bottom