comm with plc

1 year 8 months ago #29534177 by jcco104
comm with plc was created by jcco104
is it posible to read inputs of a plc using a script in the controller ?

Please Log in or Create an account to join the conversation.

1 year 8 months ago #29534178 by Gabriel_Isko
Replied by Gabriel_Isko on topic comm with plc
You can print values from our controller over RS232, and USB using the print() function in MicroBasic. You can also change our user variables in a script, which are sent over TPDOs in CANOpen, or construct raw can messages to send in RawCAN mode.

Please let me know which communication protocol you are planning to use with our controllers (USB, RS232, or CAN) or if you wanted to do something over GPIO, and I will give you recommendations for resources or implementation advice.

Please Log in or Create an account to join the conversation.

1 year 8 months ago #29534181 by jcco104
Replied by jcco104 on topic comm with plc
im using rs232 but i want to sent input data from the plc to your controller is this posible

Please Log in or Create an account to join the conversation.

1 year 8 months ago #29534187 by jcco104
Replied by jcco104 on topic comm with plc
is it possible to use user boolean variables and then in the plc using rs232 change them according to the inputs of the plc?

Please Log in or Create an account to join the conversation.

1 year 8 months ago - 1 year 8 months ago #29534189 by Gabriel_Isko
Replied by Gabriel_Isko on topic comm with plc
Yes, you can use the !VAR command to set a collection of variables that are accessible over our serial interface. Please take a look at the !VAR documentation starting on page 235 of our User Manual :


By using !VAR you can set values of up to 32 integers from a serial connection by using the serial command
!VAR nn mm

Where nn is the variable number and mm is the value you are trying to set. Then in MicroBasic you can check the value you just sent using the function getValue():
result = getValue(_VAR, nn)
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.190 seconds